[jboss-user] [JCA/JBoss] - Re: OracleConnection underlyingConn after Close(); do not wo

weston.price@jboss.com do-not-reply at jboss.com
Wed Mar 21 06:19:47 EDT 2007


You are getting the underlying Oracle connection and closing it. At this point, the connection has become unusable because you have directly closed the physical connection and as a result, it is no longer valid. 

Close the handle, NOT the actual connection. The example psuedo code illustrates this:


  |    
  |    Connection conn = DataSource.getConnection();
  |    Connection oracleConn = conn.getUnderlyingConnection();
  |    
  |    //Do JDBC stuff heere
  | 
  |    //CLOSE THE HANDLE, NOT THE UNDERLYING CONNECTION!!!!
  |    conn.close();
  |  
  |    conn = DataSource.getConnection();
  |    oracleConn = conn.getUnderlyingConnection();
  | 
  | 

As far as the 'reboot' thing is concerned, I believe what you mean is that your application has become unusuable. The app server as whole would not be effected by this. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030167#4030167

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030167



More information about the jboss-user mailing list