• Post Reply Bookmark Topic Watch Topic
  • New Topic

Transaction Handling

 
Karthik Prabu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

We need to call different EJB methods from a single method, all those methods inturn calls some stored procedures. We need to make these calls ATOMIC. We dont have an option to make all the different Stored Procs to a single procedure and handle the atomicity within it. So we have decided to use Programatic Transactions and handle it using JTA. Is this a good approach? Is there any better approach than this?. Please let me know your views.

Thanks
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Karthik,

First thing that you need to clarify is whether or not your app commits/rollback transactions in your stored procedures. Bear in mind that the result of managing transactions in both EJBs and store procedures is highly unpredictable.
Having said that you should probably consider using a straight CMT approach and demarcate transactions using transaction attributes in deployment descriptors. If there are certain requirements that makes this unfeasible than you can use BMT. At the most extreme case and only if there is no other solution that meets your app requirements, you might consider implementing the entire transaction management through the stored procedures.
Regards.
 
Karthik Prabu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Valentin,

First thing that you need to clarify is whether or not your app commits/rollback transactions in your stored procedures

No.

I prefer using BMT. I will try to do a little proto-type on this and get back to you if i face any problems.

Thanks for replying
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!