Alexey, I use tomcat and mysql can you please give an correct configuration example to do connection pooling. Because I'm using DBCP and I really got the feeling that some connection don't close. E
-----Original Message-----
From: Alexey A. Efimov [mailto:[EMAIL PROTECTED]
Sent: Tue 17/06/2003 16:39
To: [EMAIL PROTECTED]
Cc:
Subject: Re: [castor-dev] Again Castor JDO and Connection Pooling
Hello,
I think all that Castor will not control opening and closing database
connections. It must be on side control.
You must use JDBC drive implementation for connection control, becose each of
them bo it correctly.
Also, i not recomend using PoolMan or DBCP for this purpose if JDBC drive for
database can do it by itself. For example, mySQL drive can do reconect, Oracle driver
have OracleDataSourceCacheImpl for conenction pooling etc.
And finaly Tomcat and more application servers have JNDI connection pooling,
Castor can use DataSources by JNDI name.
Thanks!
-----Original Message-----
From: Schlachter, Steffen (LDS) [mailto:[EMAIL PROTECTED]
Sent: Monday, June 16, 2003 9:49 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Again Castor JDO and Connection Pooling
Hello,
thanks for all your help.
So far I figured out the following problem with connection pooling
with Castor JDO (please correct me if I'm wrong):
- Castor does neither get the connection from the pool when you call
db.getConnection() or db.begin()
- nor does it close the connection on db.close()
- instead it seems to be getting the connection when the actual
execute command is called
I found the solution to that problem in the newsgroups:
- To close the connection properly, i.e. to hand it back to the pool
you need to close the ResultSet, too.
I do not reckon that that is the way it should work, though.
Anyway, I am looking for a code snippet which demonstrates a better
way of doing it.
(Mark, can you elaborate on the mail you sent to my earlier email and
show me how to implement that factory object, please)
Regards,
Steffen
<<winmail.dat>>
