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.

Bug 77473 - Use Database causing merged dd provider to create two resource-ref entries (instead of one).
Summary: Use Database causing merged dd provider to create two resource-ref entries (i...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: martin_adamek
URL:
Keywords:
: 77474 (view as bug list)
Depends on:
Blocks: 80015
  Show dependency tree
 
Reported: 2006-06-06 23:46 UTC by _ pcw
Modified: 2009-11-10 06:50 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2006-06-06 23:46:24 UTC
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.
Comment 1 Martin Adamek 2006-07-11 14:23:20 UTC
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.
Comment 2 Martin Adamek 2006-07-11 15:12:59 UTC
'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
Comment 3 Martin Adamek 2006-07-11 15:48:11 UTC
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.
Comment 4 Martin Adamek 2006-07-11 15:50:18 UTC
*** Issue 77474 has been marked as a duplicate of this issue. ***
Comment 5 Vince Kraemer 2006-10-09 15:42:25 UTC
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.
Comment 6 Vince Kraemer 2006-10-09 15:52:26 UTC
disregard previous note.  I opened issue 86785 to track the issue I am seeing.
Comment 7 martin_adamek 2007-07-25 08:47:44 UTC
Should be fixed with new infrastructure.