This is how I have implemented ,
Used SSB with BMT-
Code:
| void myAtomicProcess(String a, String b)throws MyException{
| try{
| userTx.begin()
| //2. update file ...
| fileOperFlag = true
| //1. update db...
| userTx.commit()
| DBoperFlag = true
|
| }catch(){}
| finally{
| if(fileOperFlag && !DBoperFlag){
| //Restore the file to its original state
| }
|
| }
|
| }
|
Please let me know if you see any flaw in this.
Regards,
Sandeep Kulkarni
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152477#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...