You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Vanita Shroff <va...@xentel.com> on 2003/06/30 22:36:07 UTC

DBCP Connection Pooling

Hello:

I am using DBCP  Jdbc2PoolDataSource and DriverAdapterCPDS for having a pool of connections for a client-server application (without having an middle layer application server tier). I am using Sun One Directory Server to bind my Jdbc2PoolDataSource as a datasource object. I can successfully bind the object. But from the client machine when I do JNDI lookup as:
Jdbc2PoolDataSource ref = (Jdbc2PoolDataSource)ctx2.lookup(pooldsbindString);

Connection c = ref.getConnection();

I get a nullpointerexception. Any idea what am I doing wrong here? How can I create a pool of connections on the server and connect it from the client using JNDI without using an application server tier?

Thanks,

VS