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 83016 - SunDatasourceManager seems to report wrong DSs when GF is not running
Summary: SunDatasourceManager seems to report wrong DSs when GF is not running
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All Linux
: P2 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-18 17:59 UTC by Marco Walther
Modified: 2006-08-22 18:23 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 Marco Walther 2006-08-18 18:00:00 UTC
NB build 200608100000
GF build Sun Java System Application Server Platform Edition 9.0 (build b47)

I have two `user' JDBC Resources/Connection Pools configured. The piece of the 
domain.xml:

   <jdbc-resource enabled="true" jndi-name="jdbc/sample" object-type="user" 
pool-name="SamplePool"/>
   <jdbc-resource enabled="true" jndi-name="jdbc/dataSource" 
object-type="user" pool-name="mysqlPool"/>
    <jdbc-connection-pool allow-non-component-callers="false" 
connection-validation-method="auto-commit" datasource-class
name="org.apache.derby.jdbc.ClientDataSource" fail-all-connections="false" 
idle-timeout-in-seconds="300" is-connection-va
lidation-required="false" is-isolation-level-guaranteed="false" 
max-pool-size="32" max-wait-time-in-millis="60000" name="
SamplePool" non-transactional-connections="false" pool-resize-quantity="2" 
res-type="javax.sql.DataSource" steady-pool-si
ze="8">
      <property name="Password" value="app"/>
      <property name="PortNumber" value="1527"/>
      <property name="DatabaseName" value="sample"/>
      <property name="serverName" value="localhost"/>
      <property name="User" value="app"/>
    </jdbc-connection-pool>
    <jdbc-connection-pool allow-non-component-callers="false" 
connection-validation-method="auto-commit" datasource-class
name="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource" 
fail-all-connections="false" idle-timeout-in-seconds="
300" is-connection-validation-required="false" 
is-isolation-level-guaranteed="true" max-pool-size="32" max-wait-time-in-m
illis="60000" name="mysqlPool" non-transactional-connections="false" 
pool-resize-quantity="2" res-type="javax.sql.DataSou
rce" steady-pool-size="8">
      <property name="Password" value="travel"/>
      <property name="URL" 
value="jdbc:mysql://bsqe-timon.sfbay.sun.com/travel"/>
      <property name="User" value="travel"/>
    </jdbc-connection-pool>

When I call J2eeModuleProvider.getServerDataSources() when the GF is not 
running, I see

mw 
DesignTimeDataSourceServiceImpl.getServerDatasources(WebProject[MasterFileObject@b66ca[home/marcow/WebApplication7]])
mw    1  jdbc/dataSource, org.apache.derby.jdbc.ClientDriver, 
jdbc:derby://localhost:1527/sample, app
mw    2  jdbc/sample, org.apache.derby.jdbc.ClientDriver, 
jdbc:derby://localhost:1527/sample, app

But when GF is up and running, everything seems to be fine;-)
Comment 1 _ ludo 2006-08-18 18:12:46 UTC
Then the workaround is to start glassFish.
So it is a P2 since there is a workaround.
Comment 2 Nitya Doraisamy 2006-08-22 18:23:13 UTC
The daatsource list created from parsing domain.xml was referring to the last
connection pool in the domain.xml all the time. Fixed the parsing code in plugin.