Hi, given that you already have a JDBC DataSource configured within your EJB container/application server, wouldn't you be better of telling Castor JDO to simply (re)use that DataSource through a JNDI lookup ?
Regards Werner On Fri, 21 Oct 2005 17:02:16 +0200, Ralf Joachim wrote: >Hi Brian, > >you have to configure JDOManager with the following method: > > /** > * Initialize the JDOManager configuration with given name, > * engine, datasource, transaction demarcation and mapping. > * > * @param name The Name of the database configuration. > * @param engine The Name of the persistence factory to use. > * @param datasource The preconfigured datasource to use for > * creating connections. > * @param mapping The previously loaded mapping. > * @param txManager The transaction manager to use. > * @throws MappingException If LockEngine could not be initialized. > */ > public static void loadConfiguration( > final String name, final String engine, > final DataSource datasource, > final Mapping mapping, final TransactionManager txManager) > >This method has been introduced with 0.9.9 release of castor. > >Hope this helps >Ralf > > >[EMAIL PROTECTED] schrieb: >> I'm confused, I have a servlet container and I want to use the >> datasource connection pooling offered by a jndi lookup. I have >> looked through the jdo configuration help on the site and I >> don't understand how a castor.jdo.Database works. I looked >> through castor source code and I don't see anywhere that it is >> implementing the java.sql.DataSource interface and if I >> understand correctly that is the one that my container will >> use when managing a pool of connections. >> >> My whole difficulty here is I have a lot of application >> reliance on ejb's interacting with my database and I need to >> integrate a Castor solution without introducing yet another >> config-file to keep track of. I read the JDOConfFactory >> alternative and that would work great if I could find a way to >> drop an instance of the java.sql.DataSource that I already >> have into the creation of the castor.jdo.Database. >> >> Any thoughts. >> >> Bryan LaPlante >> >> ------------------------------------------------- >> If you wish to unsubscribe from this list, please >> send an empty message to the following address: >> >> [EMAIL PROTECTED] >> ------------------------------------------------- > >------------------------------------------------- >If you wish to unsubscribe from this list, please >send an empty message to the following address: > >[EMAIL PROTECTED] >------------------------------------------------- > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

