BorrowedConnectionProxy does not support isClosed() operation
-------------------------------------------------------------
Key: HHH-1744
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1744
Project: Hibernate3
Type: Bug
Components: core
Environment: hibernate 3.2.0.cr1, oracle9i
Reporter: Roel Adriaensens
If you try to invoke the isClosed() method of a connection, the BorrowedConnectionProxy will call ConnectionManager.getConnection() which results in a HibernateException if the connection is closed.
stacktrace:
Caused by: org.hibernate.HibernateException: connection manager has been closed
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:141)
at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:40)
at $Proxy131.isClosed(Unknown Source)
...
Relevant code (BorrowedConnectionProxy):
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if ( "close".equals( method.getName() ) ) {
connectionManager.releaseBorrowedConnection();
return null;
}
// should probably no-op commit/rollback here, at least in JTA scenarios
if ( !useable ) {
throw new HibernateException( "connnection proxy not usable after transaction completion" );
}
try {
return method.invoke( connectionManager.getConnection(), args );
}
catch( InvocationTargetException e ) {
throw e.getTargetException();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|