I see there already was a discussion about this topic:
http://forum.hibernate.org/viewtopic.ph ... rexception
Just upgraded from 2.0.3 to 2.1beta6 and start getting NPEs.
According to the documentation "If the Session throws an exception (including any SQLException), you should immediately rollback the transaction, call Session.close() and discard the Session instance".
In my code I always catch HibernateException and act appropriately. But obviously, my code is not filled with catch (NullPointerException). Since I'm using variation of Thread Local pattern, this may cause session will not be closed and transaction will not be rolled back.
The question is: should I start catching NPEs or another exception will be used for the same purpose in 2.1 release?