• Post Reply Bookmark Topic Watch Topic
  • New Topic

userTransaction  RSS feed

 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:

In what type of beans(or servlet?) do we need/better to use userTransaction?

Thanks a lot!
 
Murali Pen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically, you use user transaction with session beans when you decide to use BMT (bean managed transactions). You cannot use user transaction with entity beans because their transactions are always container managed. You can use user transaction with servlets if you want control over the transaction boundaries.
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

Does userTransaction come with EJB1.0 or EJB2?
 
Murali Pen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
User transaction is not specifically meant for EJB only. It doesn't come with EJB but is an API that has to be supported by the J2EE server vendors. Actually it is the Java Transaction API (JTA). JTA classes are in the package javax.transaction. They can be used with EJB 1.0 also but at the time of EJB 1.0 the package was javax.jts.
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot, Murali.

Do you have any website that apply JTA on EJB?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!