OMG! I am surprised that even works at all.
First, a session is not thread-safe and should not be used by more than one thread at once. The typical result is an exception saying something about "possible non-threadsafe access".
http://docs.jboss.org/hibernate/stable/ ... ssion.htmlSecond, managing transactions would be really, really difficult with only one session. For example, if you need to rollback due to an exception the session must also be closed and not used again since the data that is cached in the session may be in an inconsistent state.
http://docs.jboss.org/hibernate/stable/ ... exceptionsSo, the question is what you should do instead. It depends on the type of application. If it is a web application a common design is the open-session-in-view pattern.
http://community.jboss.org/wiki/OpenSessioninViewThere is also a lot more information to find on the Hibernate wiki.
http://community.jboss.org/en/hibernateI would also recommend reading a book about Hibernate.
http://www.hibernate.org/docs/books.htmlPersonally I found the
Java Persistence with Hibernate book to be a real life-saver.