• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling three EJB methods in a single transaction

 
v sat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have an action class that calls three EJB methods. I want to run all these three method in a single transaction. How do I do it?
Thanks,
Venkat
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, there should be a Business Delegate in the middle of your call to the business methods. Actions objects should never call directly on EJB methods...
 
v sat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. I still have a doubt on how to implement this transction in the business facade layer?
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a session facade and a method which invokes these 3 methods, then you can annotate that method with @TransactionAttribute(REQUIRED). This is for CMT.

Otherwise, you should lookup the UserTransaction and handle it manually.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic