[jboss-user] [EJB/JBoss] - Re: Atomic process in Local SSB -Urgent !!!!!!!

sankul123 do-not-reply at jboss.com
Wed May 21 15:57:09 EDT 2008


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



More information about the jboss-user mailing list