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 79714 - Same connection pool used for multiple data sources
Summary: Same connection pool used for multiple data sources
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-04 15:38 UTC by Andrei Badea
Modified: 2006-08-03 23:18 UTC (History)
0 users

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 Andrei Badea 2006-07-04 15:38:14 UTC
[ NetBeans self-compiled 060703 build, JDK 1.5.0_05 ]

1. Start with a clean userdir, register GlassFish.
2. Create a new Java DB database, but don't enter an user name and password. 
3. In the Runtime tab delete the newly created connection and add it again using
derby1 as the user name and password1 as the password.
4. Create a new EJB project.
5. Invoke the Entity Classes from DB wizard, 
6. Create a new data source jdbc/derby1 from the connection added in step 3.
7. Close the wizard.
8. Disconnect the connection added in step 3, right-click on it and choose
Connect. Enter *derby2* and *password2* as the user and password. Switch to the
Advanced tab, press Get Schemas and select another schema than APP. Press OK.
9. Invoke the Entity Classes from DB wizard.
10. Create a new data source jdbc/derby2 from the connection added in step 3. 

When the Create Data Source dialog is closed the jdbc/derby1 data source was
selected in the combo box for me instead of the correct jdbc/derby2. That is the
point of another issue.

However, when you select jdbc/derby2 the Connect dialog appears asking you to
connect as user derby1. This is incorrect -- the connection in the Runtime tab
says derby2.

11. Close the wizard.

In the project's Server Resources there is only one connection pool (which
contains the user and password), but two data sources. There should be two
connection pools, one for each data source.
Comment 1 Andrei Badea 2006-07-04 15:38:53 UTC
Should be fixed in 5.5 IMHO.
Comment 2 Nitya Doraisamy 2006-08-03 23:18:28 UTC
Updated plugin's existing connection pool check to include username & password
of db connection