I just started to use Torque and I successfully used Torque to insert
data
into database using torque's old pool ie. using TorqueDataSourceFactory.
However, when I switch to use the jdbc2pool, the same program didn't
work properly. It
always hung on  the following line in Torque.getConnection(String name)
method:

con = dsf.getDataSource().getConnection();

The above code was triggered by the getMapBuilder() method in my
BasePeer subclass for my domain data object.

The configuration for jdbc2pool in my Torque.properties:

torque.database.default=POCAMS
torque.database.POCAMS.adapter=oracle

## Using Jdbc2Pool
torque.dsfactory.POCAMS.factory=\
  org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
torque.dsfactory.POCAMS.pool.defaultMaxActive=10
torque.dsfactory.POCAMS.pool.testOnBorrow=true
torque.dsfactory.POCAMS.pool.validationQuery=SELECT 1
torque.dsfactory.POCAMS.connection.driver =
oracle.jdbc.driver.OracleDriver
torque.dsfactory.POCAMS.connection.url =
jdbc:oracle:thin:@127.0.0.1:1521:POCAMS
torque.dsfactory.POCAMS.connection.user = user
torque.dsfactory.POCAMS.connection.password = password

How can I fix the problem?

Pricilla Yin





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to