Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.1.2
I am using the oracle.jdbc.OracleConnection (Oracle's Proxy Connection) ... which has a method: getUserName() ... This will return the proxy user's db username that was set in the connection.
When I call the reconnect( Connection conn ) on the Session instance (currentSession), setting a connection of type oracle.jdbc.OracleConnection ... I print out the instance name of the connection and I get an Oracle Connection instance ... specifically: oracle.jdbc.driver.T4CConnection ... this is GOOD! However, when I try to cast it as an oracle.jdbc.OracleConnection ... I get a ClassCastException. This is NOT as expected as the T4CConnection implements the oracle.jdbc.OracleConnection in the class heirarchy. So, I found out by calling: currentSession.connection().getClass().getName() that the type is: $Proxy1 ... how is this? What happens to the connection instance when the currentSession.reconnect( conn ) is called ... even though it returns the SAME instance of the connection that was passed to the method???
Does someone have any idea?
Thanks in advance!!!