Hello,
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)
conn).getInnermostDelegate();
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",
PGgeometry.class);
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
|