db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hauf...@hauf.org>
Subject GetConnection
Date Thu, 07 Sep 2006 13:59:04 GMT

I have a problem with the method Torque.getConnection(). I use Torque 
with SharedPoolDataSourceFactory.
I try to do the following - as suggested on the dbcp-configuration page:
Connection conn = Torque.getConnection();
Connection dconn = ((org.apache.commons.dbcp.DelegatingConnection) 

I have also set this in my torque-configuration: 
torque.dsfactory.spatial.pool.accessToUnderlyingConnectionAllowed = true

But I always get a ClassCastException back when I try to cast the 
connection to "DelegatingConnection".

I need to do this, because I need to add some datatypes to the 
underlaying postgres-connection:
((org.postgresql.PGConnection) conn).addDataType("geometry", 

Has anybody a solution for this problem?

Thank you!

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

View raw message