db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Iran Marcius" <i...@isic.com.br>
Subject Problem trying to use JNDI connection pool
Date Thu, 19 Dec 2002 19:09:43 GMT
I'm trying to configure torque to get datasource from JNDI, but when I
attempt to do something (like "doSelect", for instance), got always the
same error: "Connection object was null"

The database resource is correctly configured in tomcat, since I can
successfully get the Datasource and Connection through a test program I
wrote (getting an initial context and doing a lookup, etc, etc), or
should I mistaken about that?

The relevant portion of my torque.properties is (my database name is
"global"):

## Using jndi
torque.dsfactory.global.factory=org.apache.torque.dsfactory.JndiDataSour
ceFactory
torque.dsfactory.global.jndi.path=java:comp/env
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
torque.dsfactory.global.datasource.classname=org.apache.torque.pool.Torq
ueClassicDataSource
torque.dsfactory.global.datasource.dataSourceName=jdbc/global
torque.dsfactory.global.datasource.jndiEnvironment.java.naming.factory.i
nitial = org.apache.naming.java.javaURLContextFactory
torque.dsfactory.global.datasource.jndiEnvironment.java.naming.factory.u
rl.pkgs = org.apache.naming
torque.dsfactory.global.datasource.defaultMaxConnections=10

Do I need all this lines? About torque.dsfactory.global.jndi.path and
torque.dsfactory.global.datasource.dataSourceName I already tried a lot
of combinations, and I'm not sure about its values.

Any would be very appreciated.

Thanx.

iran


Mime
View raw message