-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: What is the $Proxy1 connection from Session.connection()????
PostPosted: Wed Mar 15, 2006 10:40 am 
Newbie

Joined: Tue Mar 14, 2006 7:35 pm
Posts: 3
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!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.