You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by fishchips <an...@accumio.de> on 2009/01/09 10:03:43 UTC

How to get OracleConnection from oracle.jdbc.driver.T4CConnection?

We have Geronimo AS 2.1 with a datasource configured for an oracle 11
database.

This datsasource is used in an MDB:
@Resource(name="jdbc/SOAP_LOGG_NRDS") private DataSource ds;
...
Connection conn=ds.getConnection();

getAssociation() on this connecton returns a
org.tranql.connector.jdbc.ManagedJDBCConnection.
Calling getPhysicalConnection() on MenagedJDBCConnection I get
oracle.jdbc.driver.T4CConnection.
( Interestingly, I  only can call getAssociation and getPhysicalConnection
using reflection.
Casting like
                  OracleConnection oraConnection2 = (OracleConnection)
((ConnectionHandle) conn).getAssociation().getPhysicalConnection();
results in ClasscastException. )

What I actually need is an OracleConnection to pass into
CLOB.createTemporary() or something like this.

How can I cast this connection to OracleConnection?

Or how can I configure a datasource to make it return me something
compatible with OracleConnection?
-- 
View this message in context: http://www.nabble.com/How-to-get-OracleConnection-from-oracle.jdbc.driver.T4CConnection--tp21368519s134p21368519.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.