db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Schneider" <bschnei...@vecna.com>
Subject Re: Problem trying to use JNDI connection pool
Date Thu, 19 Dec 2002 20:24:24 GMT

You might try deleting some of the unnecessary lines from
Torque.properties... One that works for me only has a handful of lines

## Using jndi

Perhaps some of the lines in your config file are interfering with Tomcat's
JNDI context.  In particular,

> torque.dsfactory.global.jndi.java.naming.factory.initial=org.apache.nami
> ng.java.javaURLContextFactory
> torque.dsfactory.global.jndi.java.naming.factory.url.pkgs=org.apache.nam
> ing

You don't want to set up your own initial context... you want to use the one
supplied by Tomcat, because that's where your datasources are bound.  The
default config file may occasionally be confusing because there are examples
for both looking up a DS from a JNDI context provided by the app server, and
having Torque create its own JNDI Context and binding a datasource to it,
rather than looking it up.

-- Bill

View raw message