Thanx for the answers. I just realized that what I want to do is more complex. I use Hibernate and pass the jdbc resource to the Hibernate configuration. Oracle has a temporary table for each session to the database in which you can store 2 varchar arguments for monitoring purposes ( in my case the module and method that acquired the connection ). The problem is that I have to pass the arguments at the moment I acquire the connection in Hibernate so extending the factory won't help. But this question is for a Hibernate mailing list most probably.
ROOKIE-4 wrote: > > To execute custom code while getting a connection u can extend the > connection factory and mention that class as the factory for ur resource, > I dont think we close connections using the factory, so maybe u can write > a wrapper around Connection.close() method. > > ----- Original Message ---- > From: Sorin Juco <[EMAIL PROTECTED]> > To: users@tomcat.apache.org > Sent: Wednesday, May 30, 2007 1:11:18 PM > Subject: JDBC resource with custom connection pool factory > > > Hello, > > I want to create a JDBC resource wich represents a connection pool to an > Oracle server. By default Tomcat uses DBCP to provide the connection pool > implementation. My problem is that I want to execute some custom code each > time I get a connection from the pool and also each time I release the > connection back to the pool. > Does this mean that I have to implement my own conn-pool factory? Or can I > do this using DBCP. I couldn't find an answer anywhere. Can someone point > me > to a tutorial! > > Thanx. > -- > View this message in context: > http://www.nabble.com/JDBC-resource-with-custom-connection-pool-factory-tf3838781.html#a10869019 > Sent from the Tomcat - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > ____________________________________________________________________________________Building > a website is a piece of cake. Yahoo! Small Business gives you all the > tools to get online. > http://smallbusiness.yahoo.com/webhosting > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/JDBC-resource-with-custom-connection-pool-factory-tf3838781.html#a10870039 Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]