• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Transactions

 
Arjun Reddy
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

EJB Container provides Transactional management right by default? Can we start and end the transactions instead of the container doing it?

Thanks.
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arjun,

Yes, this is one of the traditional value propositions of EJB.

Regards,
Reza
 
Arjun Reddy
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um... could you tell me how?

Thanks.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BMT is an acronym for bean managed transactions. CMT is container managed transactions.

It looks like you want to learn how to write BMT Session EJBs. The Java API that is best suited for this is in the javax.transaction package. The primary interface is UserTransaction.

Also, check out the Java Transaction API (JTA) for other options.

Good luck!
[ October 20, 2008: Message edited by: James Clark ]
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arjun,

It's not really practical to provide a useful explanation of EJB 3 transaction management on a forum post. Here is an article that might help some: http://java.sys-con.com/node/325149.

Also, any good EJB 3.0 reference will cover this.

Regards,
Reza
 
Casttro Francis
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arjun,

Cant you give one reason, why you are not going for CMT.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!