This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
For JavaEE5, the sun specific deployment descriptor files are optional much of the time, but currently are always saved, even if they only have trivial content. The existing architecture supports optional DConfigBeans, but is coded on the assumption that root beans always have content which is why we always write something to disk even for cases when there is no real content. I need to relax this restriction so that root beans become optional. Upon doing so, if there is no existing sun specific descriptor file and the user wishes to add one (for example, to configure cache values for a web app or ejbs), we will need the capacity to create the file. We will add a file template for each of the sun deployment descriptor types.
The addition of the file template is really a feature, but while it was discussed months ago, it did not make feature freeze. But it is very low risk and we will need to implement it (or some alternative) if these files are to become optional.
IMO, you can still add the template, since this is needed to fix this bug. Do not stick too much of obsolete schedules. Do the right thing for the customers... Having optional Sun*.xml files is very important for Java EE 5 Ease of development... Act rapidely, if possible.
sun-ejb-jar.xml, sun-application.xml, and sun-application-client.xml for JavaEE5 modules are generally trivial (ie no required or desired fields) for small modules (unless they use security, which requires security role mapping fields). For sun-web.xml however, we add two properties to jsp-config: "classdebuginfo=true" and "mappedfile=true". They are added for developer usability and in particular, w/o the first one, debugging JSP's does not work because the generated servlet won't have debug information. This means that even after the implementation of this feature, at least as it is currently planned, we would still generate sun-web.xml. I might be able to refrain from creating it in the context of an existing project (ie new projects get the defaults, but not existing ones) but that very tricky because it does not address old projects that were created against another server, and then retargeted to sun appserver.
I have this fixed and operational on my workstation. It is a rather invasive change, and touches many files so I'm still reviewing the changes.
Changes for optional sun descriptor files support: http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/config/ConfigDataObject.java?r1=1.3.6.5.2.6&r2=1.3.6.5.2.7 http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/config/SecondaryConfigDataObject.java?r1=1.2.8.2.2.2&r2=1.2.8.2.2.3 http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/config/Utils.java?r1=1.4.6.2.2.1&r2=1.4.6.2.2.2 http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/config/ConfigurationStorage.java?r1=1.4.6.5.2.1&r2=1.4.6.5.2.2 http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/config/ui/ConfigBeanNode.java?r1=1.2.8.1.2.2&r2=1.2.8.1.2.3 http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/config/ui/ConfigBeanTopComponent.java?r1=1.3.6.5.2.2&r2=1.3.6.5.2.3 http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/configbean/SunONEDeploymentConfiguration.java?r1=1.2.16.7.2.19&r2=1.2.16.7.2.20 http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/configbean/Bundle.properties?r1=1.1.16.2.2.10&r2=1.1.16.2.2.11 New template wizard is composed of layer changes in sunddui plus all files in serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/configbean/templates
This issue is fixed. Sun-???.xml files will not be created for JavaEE5 modules for EJB, EAR, and App Client. sun-web.xml will still be created for web modules so we don't disable JSP debugging (see reasons above). There are some cases where a sun-???.xml file is unnecessarily saved, such as saving sun-application.xml when adding a j2ee module to an ear that I still need to clean up. They should be filed as separate issues so we can better keep track of them.