Problem:
Some DAO methods acquire connections by
getSession().connection()
before calling stored procedures. Then they close the connection explicitly with
JdbcUtils.closeConnection()
Then the application throws "HibernateException: connection proxy not usable after transaction completion" from time to time.
Solution:
As described in Hibernate API, "if the session is using aggressive collection release (as in a CMT environment), it is the application's responsibility to close the connection returned by this call. Otherwise, the application should not close the connection". So in this case, it is fixed by remving the code to close connections.
Showing posts with label hibernate connection proxy java. Show all posts
Showing posts with label hibernate connection proxy java. Show all posts
Wednesday, April 1, 2009
Subscribe to:
Posts (Atom)