On Mon, 15 Sep 2003, Gary Baker wrote: > I want to setup Torque to use an external DB connection pool. > Basically, we have a group of applications running under one instance of > Tomcat and all the other applications (besides my new Turbine app.) use > the same connection pool.
You may wish to examine JNDI (Java Network Directory Interface). JNDI provides a way of configuring a data source and giving it a name, which can be access by Torque. JNDI background: http://java.sun.com/products/jndi/ For information about setting up Tomcat to create a JNDI database connection, see: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html To use a JNDI pool with Torque, see: http://db.apache.org/torque/configuration-howto.html Depending on how the pool the other applications use works, some changes may be needed to use JNDI, or it may be completly impractical. Note that I have not used JNDI, so I can't really say how well this would work. If I've misunderstood and you want to add another type of pool to Toruqe, then you should probably look at how org.apache.torque.dsfactory.SharedPoolDataSourceFactory and friends are implemented, and cook up some new pool code based on that. Then you should be able to just put your new pool class name in your property file for the torque.dsfactory.XXX.factory property. mch [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]