• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

userTransaction  RSS feed

 
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!
 
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!