Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Does WsJdbcDataSource support getConnection(String, String)?

79 views
Skip to first unread message

jwhitall

unread,
Jul 14, 2004, 12:29:22 PM7/14/04
to
We are connecting to a DB2 database whose password changes daily. There is a service that has been written that programmatically retrieves the correct login information (username and password) that is valid for the given moment in time. I am trying to define a Websphere 5 Data Source for this situation, and I am running into problems. I have read documentation that I have to provide an alias to a V5 data source as part of administration configuration if the username and password is required to connect to the DB. Unfortunately, since we don't know what the password is going to be then, we can't set up the authentication credentials.

I get the following error when I try to use dataSource.getConnection(String, String):
E J2CA0046E: Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/myds, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a PooledConnection from the DataSource.
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:244)
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:171)
at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:208)
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:706)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
..

Any help or suggestions would be appreciated.

Jonathan Whitall

jwhitall

unread,
Jul 14, 2004, 5:32:48 PM7/14/04
to
I had been futilly searching for help on this topic, and it wasn't until I ran across the JDBCConnectionSpec object that I finally started getting the information I needed.

So, the long and short of it is that getConnection(String, String) when your res-auth is set to Container is exactly the same thing as plain old getConnection(). I changed my res-auth to Application, and it works beautifully.

The article is at: http://www-106.ibm.com/developerworks/websphere/techjournal/0402_tang/0402_tang.html

Jonathan

0 new messages