Hi,
Hibernate ver. 2.1.6
Oracle 9.2.0.1.0
Weblogic 8.1 SP3
During load-tests of application following exception sometimes occures:
Code:
Caused by: java.lang.IllegalStateException: Inactive logical session handle called
at net.sf.hibernate.jca.ManagedConnectionImpl.getSession(ManagedConnectionImpl.java:357)
...
Have anybody an idea what can cause this? I first thought, that may be it's connected with lack of connections in servers's JDBC pool but monitoring page of pool shows, that maximum connections have never been exceeded.
I tried to get an idea through reviewing hibernate's sources but it was not quite successful... Method from class net.sf.hibernate.jca.ManagedConnectionImpl throwing this error is following:
Code:
Session getSession(JCASessionImpl handle) {
// JCA 1.0, 5.5.4
// Ensure that there is at most one connection handle associated
// actively with a ManagedConnection instance. [skiped] Any operations
// on the ManagedConnection from any previously created connection
// handles should result in an application level exception.
// this might be pretty bad for performance, profile and find a
// better way if it is really bad
synchronized (handles) {
if ( handles.size() > 0 && handles.get(0) == handle) {
return session;
}
else {
final String message = "Inactive logical session handle called";
// cannot throw HibernateException because not all Session
// methods throws it. This is incompatible with the spec!
throw new IllegalStateException(message);
}
}
}
Any idea or suggestions about potential cause of this error?
Code: