dcsimg
java transaction API
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   dinker_pandey
Posted On:   Tuesday, June 17, 2008 03:07 AM

I am using JTA in my project.I started transaction in servlet though JTA and calling session bean(transaction type is Bean type)method,in session bean method i am calling entity bean method(transaction type is bean type).when any exception is occuring,it is not doing rollback .
Pls explain what is the problem,is there any solution for this?Pls help me it's urgent for me.

Re: java transaction API

Posted By:   Stephen_McConnell  
Posted On:   Tuesday, June 17, 2008 10:40 AM

You have to catch the exception and do the rollback yourself. This logic is in most API's that have to do with transactions.


This is because an exception may occur, you catch the exception and you might be able to handle that problem without rolling the entire thing back.


I don't find that to be the case often, but the concept is there to provide that flexibility if it is needed. It makes the programmer more responsible, but what the heck... We are all responsible people and Henry knows it.


Stephen McConnell

About | Sitemap | Contact