I'm wondering when the session actually obtains the connection from the connection pool, b/c i'm seeing some situations when i "clean up" meaning flush(), commit() and close() the session, i'm getting an error on weblogic 8.1sp2 saying that the connection is no longer available.
the connections are pooled internally to weblogic using jndi set up in the context.xml file and this situation doesn't occur all the time, but say 1-in-10 times. The pool size i have set up is 25, which should be plenty. i've got the sessions bound to the thread-local on the httprequest, and the transactions aren't long running, so i don't believe that's the trouble, especially since more intense transactions don't always get this issue, but it can happen to even the most simple database insert
it's as if hibernate goes to use the connection that it assumes it already has, and weblogic seems to have reclaimed it so hibernate is blindsided by the fact that the connection is no longer there.
i'm just wondering if hibernate delays obtaining the connection until the very end (i.e., when it's ready to flush(), and write to the db) or if when the session is created, it retrieves the connection from the pool
thanks
|