Thanks. Would it make a difference in setup of the pooling in the JDO case compared to the PBAPI ? Is it not strange to have the pooling in OJB, when this should be the task of the container (at least in the j2ee world) ? Does it matter which connection manager to choose ? I feel inclined to choose the DBCP based, but what do I know ;-)
Burt, you are using the PBAPI, and I have decided to go for the java standard JDO. What difference regarding pooling and synchronization can I expect ? Anyone else care to share their opinions on this ? ----- Original Message ----- From: "BURT, RANDALL (CONTRACTOR)" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 4:12 PM Subject: RE: How to configure OJB with Tomcat > My pleasure. I also am using OJB with Tomcat in my project, but I am not using a JNDI datasource. Since I am using the PBAPI, I just configure my connection in my repository-database.xml and specify one of the "pooled" connection manager implementations in my OJB.properties. OJB then handles the connection pooling for you. > > -----Original Message----- > From: Lukas Severin [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 9:04 AM > To: OJB Users List > Subject: Re: How to configure OJB with Tomcat > > > Thanks Burt, > > Well, first I want to say I am new to OJB so maybe I havent fully understood > what can be read at the website. That said, this is what I mean : > > When doing standard BMP EJBs or JDBC I am used to configuring a Datasource > in Tomcat > which is a standard interface to a pool of connections that I can configure > in the Context tag of Tomcats server.xml. I name this myDatasource and cann > access it from my business delegate or any bean using > > ... > Context ctx = new InitialContext(); > DataSource ds = (DataSource)ctx.lookup("java:comp/env/myDatasource"); > conn = ds.getConnection(); > etc... > > Here the Datasource is a common interface to the pool of connections setup > my Tomcat. > > Now, in the OJB/JDO case, all examples I have seen (also in the web case) > let the client create a new factory for each access : > PersistenceManagerFactory factory = new OjbStorePMF(); > PersistenceManager pm = factory.getPersistenceManager(); > Transaction tx = pm.currentTransaction(); > etc ... > > I thought this was a gigantic overhead creating a new factory for each > client call ? > Are you saying that behind the factory a pool of connections is already > handled and I need to do nothing to configure Tomcat ? Is there no need to > setup a JNDI name ? > > I found all the different type of ConnectionFactories in OJB.properties, but > didnt really get it since I thought this was the containers (ie Tomcats) job > to handle, for example using jakarta-commons-dbcp. So what I am saying is > that all I need is a pooled connection to the underlying database. > > > Thanks for help ! > > > > ----- Original Message ----- > From: "BURT, RANDALL (CONTRACTOR)" <[EMAIL PROTECTED]> > To: "OJB Users List" <[EMAIL PROTECTED]> > Sent: Thursday, June 05, 2003 3:37 PM > Subject: RE: How to configure OJB with Tomcat > > > > Pooling other than what OJB provides? > > > > -----Original Message----- > > From: Lukas Severin [mailto:[EMAIL PROTECTED] > > Sent: Thursday, June 05, 2003 6:36 AM > > To: OJB Users List > > Subject: How to configure OJB with Tomcat > > > > > > I read the documentation about setting up OJB in a servlet. However I > > couldnt find any instructions on how to configure connection pooling (eg > > using jakarta-commons) together with OJB in Tomcat so that connections to > > the database is pooled. Are there any synchronization issues to be careful > > about ? > > > > Can anyone point me to the right doc, or help me out with example tomcat > > descriptors and client code ? > > > > Thanks ! > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
