You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "MALET, CREIGHTON C (SBCSI)" <cm...@sbc.com> on 2004/06/08 17:45:53 UTC

[DBCP] Example of SharedPooledDataSource with JNDI

Where can I find an example of the use of SharedPooledDataSource with
JNDI?

In my attempts at this I get an exception from the JNDI API because
InstanceKeyDataSource (from which SharedPoolDataSource inherits the
implementation of Referenceable) specifies in the getReference() method
that
InstanceKeyObjectFactory is the factory. However that is an abstract
class and cannot be instantiated by the JNDI API implementation. I
worked around this by extending SharedPoolDataSource to overload
getReference() and SharedPoolDataSourceFactory to overload
isCorrectClass() but that doesn't seem like the correct mechanism. I am
using DriverAdapterCPDS as the connection pool datasource for
SharedDataSource.

A example (with binding to JNDI) would help a lot. I have gone through
all the examples I can find but haven't seen one that actually binds
into the JNDI.

Thanks

------------
Creighton Malet
(925)823-1463
cm2159@sbc.com



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [DBCP] Example of SharedPooledDataSource with JNDI

Posted by Dirk Verbeeck <di...@pandora.be>.
If you send me what you have already then maybe I can help you.
I did some debugging with the JNDI setup in Tomcat but not yet in a 
standalone program.

So if you start with the testcase then I'll take a look at it.

-- Dirk

MALET, CREIGHTON C (SBCSI) wrote:
> Where can I find an example of the use of SharedPooledDataSource with
> JNDI?
> 
> In my attempts at this I get an exception from the JNDI API because
> InstanceKeyDataSource (from which SharedPoolDataSource inherits the
> implementation of Referenceable) specifies in the getReference() method
> that
> InstanceKeyObjectFactory is the factory. However that is an abstract
> class and cannot be instantiated by the JNDI API implementation. I
> worked around this by extending SharedPoolDataSource to overload
> getReference() and SharedPoolDataSourceFactory to overload
> isCorrectClass() but that doesn't seem like the correct mechanism. I am
> using DriverAdapterCPDS as the connection pool datasource for
> SharedDataSource.
> 
> A example (with binding to JNDI) would help a lot. I have gone through
> all the examples I can find but haven't seen one that actually binds
> into the JNDI.
> 
> Thanks
> 
> ------------
> Creighton Malet
> (925)823-1463
> cm2159@sbc.com



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org