Hi everyone,
I'm a bit confused, and I'm hoping someone could help me:
I have a J2EE application which uses EJB 3.0 + Hibernate.
Since I'm working with a local framework, I only have entity beans and no session beans (framework elements replace the need for session beans).
I want to manage the transaction manually (begin, commit, rollback), but I'm a bit confused.
Correct me if I'm wrong, but:
- It seems to me that there are 2 way to control transactions:
1. javax.persistence.EntityTransaction
2. javax.transaction.UserTransaction
So far I've been using EntityTransaction to manage my transactions.
But now I wonder what's the difference between using EntityTranscation and UserTransacation.
Moreover, how come EntityTransaction has no 'setTransactionTimeout' method like UserTransaction has ?
Regards,
R.D
|