users@glassfish.java.net

Access to a connection wrapped by ConnectionHolder

From: <glassfish_at_javadesktop.org>
Date: Mon, 28 May 2007 14:25:02 PDT

Is there any way to get a handle on the connection that is being wrapped by com.sun.gjc.spi.ConnectionHolder?

Here's the situation. I'm running glassfish v1 P01 to connect to an oracle 10gR2 database.
I have the connection pools and jdbc resources all set up
Now in my application if I go:
  DataSource datasource = (DataSource) new InitialContext().lookup(datasourceName);
  connection = datasource.getConnection();
to get a connection it returns an instance of com.sun.gjc.spi.ConnectionHolder. Normally this isn't a problem, but it means I'm unable to do any oracle-specific stuff. I can't get an instance of oracle.jdbc.OracleConnection to work with because it's being wrapped by the Connection Holder.

So is there any way to get at the connection being wrapped?
[Message sent by forum member 'jodeen' (jodeen)]

http://forums.java.net/jive/thread.jspa?messageID=219201