tags:

views:

34

answers:

1

before calling session.gettransaction, do I have to ensure one exists?

if so, how do I check if there is a current uncommitted transaction in the session?

+2  A: 

No, you do not have to check. Session.getTransaction will initiate a new transaction if a current one does not exist.

See source code for SessionImpl.getTransaction and JDBCContext.getTransaction.

skaffman