Thank you Khazoo , for your support.

"kahzoo" wrote :  
  | 
  | With BMT, you need to do the transaction demarcation (begin, commit, 
rolback) yourself, but since your bean will know the outcome of the 
transaction, it can decide to write/do-not-write data in the file accordingly.
  |  


This is how I have implemented ,
Used SSB with BMT-

  | 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=4152476#4152476

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4152476
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to