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.
1. Create EJBModule for JavaEE5 targeting Glassfish. 2. Add a session bean. 3. In session bean source, invoke "Use Database". Accept defaults (jdbc/sample) and hit ok. 4. Open sun-ejb-jar.xml in config editor and browse to the resource-ref entries. You will find there are two of them, one named "jdbc/sample" and a second one named "sample". 5. Additionally, if you restart the IDE and open the config editor again, the resource-ref nodes are no longer displayed (wait until initial scan stops). See related issue 77470.
One entry 'jdbc/sample' is added by wizard directly (this should be removed) and the other one - 'sample' is auto-discovered. No. 5) is fixed - there is 'sample' now after restart. Anyway name should be jdbc/sample so there is still problem in resolving.
'sample' name instead of 'jdbc/sample' problem is fixed now: http://j2ee.netbeans.org/source/browse/j2ee/metadata/src/org/netbeans/modules/j2ee/metadata/NNModelBuilder.java?r1=1.1.2.30&r2=1.1.2.31
Problem with wizard writing to model is fixed: /cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entres/UseDatabaseAction.java,v <-- UseDatabaseAction.java new revision: 1.3.2.3.2.12; previous revision: 1.3.2.3.2.11 Only remaining problem is now multiple entries for datasource added by model builder.
*** Issue 77474 has been marked as a duplicate of this issue. ***
A variation of this issue appears to affect web projects, too. I used the 'Use Database' item in a servlet and ended up with 4 resource-ref entries in the sun-web.xml. The user can edit data associated with these entries and one of them will be used.... This was with a recent update and build of the release55 branch.... There are multiple entries in the sun-web.xml file because multiple add events get fired for the single use database action.
disregard previous note. I opened issue 86785 to track the issue I am seeing.
Should be fixed with new infrastructure.