Hi,
We have this configuration for our webapp.
Hibernate 2.1
JBoss 3.2.3
Database - DB2
Datasource is managed by the App Server and Transactions are also managed by app server.
From web tier we pass the object graph to a Session bean which then delegates the request of saving to a DAO class which makes use of the Hibernate to do save operations.
In the DAO class we have "finally" clause for every methods which needs Hibernate Session, where we close the hibernate session and we also throw EJBException from Session bean so that transaction also gets roll back, but whenever any error occus in the DAO class while saving we can see this warning appearing.
----------------------------
WARN [SessionImpl] finalizing unclosed session with closed connection
-----------------------------
Also we make use of a static class to fetch the session and close the session.At the load of the class we have a static block that does a jndi lookup for the SessionFactory and stores it in a static variable thats available throughout the life cycle. We are making use of "ThreadLocal" way of fetching and closing the session.
What can be the possible reasons?
Thanks
|