Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

registering a DB2ConnectionPoolDataSource in tomcat 5.5

dileep_sivaraman

2007-07-27

Replies:


Hi ,

I am trying to register a com.ibm.db2.jcc.DB2ConnectionPoolDataSource
datasource in tomcat 5.5.4.

I am not getting any exception's while doing a context lookup and gives me
the datasource.
However the paramaeter's that are set with that Resource are always null.

Server.xml
<GlobalNamingResources>
<Resource name="jdbc/db2universal"
type="com.ibm.db2.jcc.DB2ConnectionPoolDataSource"
factory="com.ibm.db2.jcc.DB2DataSourceFactory"
serverName="PROD9S03.bankofamerica.com" username="abc" password="abc"/>

</GlobalNamingResources>

In my code I get the datasource as :

connPoolDataSource=(DB2ConnectionPoolDataSource)
envContext.lookup("jdbc/db2universal");

However when I print out the serverName parameter that has been set in the
resource it prints null.

System.out.println("connPoolDataSource.getServerName()
:"+connPoolDataSource.getServerName());

OUTPUT:

connPoolDataSource.getServerName() :null


Can somebody tell me what I am doing wrong?
--
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.