if you encounter an exception you should close that session, not performing more operations within it.
Quote:
A HibernateException means your have to rollback your transaction and close the Session. If your Session is coupled to the application; you have to stop the application. Rolling back the database transaction doesn't put your business objects back into the state they were at the start of the transaction. This means the database state and the business objects do get out of sync. Usually this is not a problem, because exceptions are not recoverable and you have to start over after rollback anyway.
from
http://www.hibernate.org/168.html