db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Baker" <gary.ba...@movielink.com>
Subject RE: external DB connection pool access
Date Mon, 15 Sep 2003 21:42:44 GMT
Matt,
Thanks a bunch.
We were using JNDI for the other apps, so that worked for me perfectly!
Cheers,
Gary

-----Original Message-----
From: Matt Hughes [mailto:mhughe@uvic.ca] 
Sent: Monday, September 15, 2003 2:16 PM
To: Apache Torque Users List
Subject: Re: external DB connection pool access


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.htm
l

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
mhughe@uvic.ca


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message