Thanks for reply.
In the following post it says, if we access an entity in non-transactional way, we need to enable auto-commit in hibernate configuration.
If not, once we close the session (we used for retrieving the entity) the database connection returning to the pool will have some issues/memory leaks.
lines in this link "the connection is in whatever mode it is by default after obtained from the pool, and returned there without commit or rollback. The behavior is then undefined."
kindly make me clear here.