I was going through 'Java Persistence with Hibernate' book and got stuck at Page#494. We do extending a conversation by setting hibernate.current_session_context_class to managed; does that mean now I cannot use 'jta' inside my methods? This assumptions is getting more stronger when I looked at the interceptor code at Page#494. In the interceptor, we are calling 'currentSession.beginTransaction' that means we are using Hibernate Transaction API to control the transaction. Does this mean, my Entities cannot use UserTransaction.begin()/commit() to control the transaction?
I'm telling this because somewhere in this book I even read that when you use UserTransaction to control the transaction boundaries, you're not suppose to use Hibernate Transaction APIs?
Need some help here.
|