[jboss-user] [Beginners Corner] - Local SSL process [method - CMT used] atomic operations issu

sankul123 do-not-reply at jboss.com
Sun May 18 14:07:58 EDT 2008


Hi ALL,

I have a following process, to be done by (Local)SSB[Stateless Session Bean]-
<atomic operations in a method in SSL>
1. Persist [update] some values in database.
2. Some file operations , write some data to file.
</atomic operations>
I want both operations to be atomic. My Local SSL EJB is a CMT and its method 'transaction' attribute is marked for new transaction.
Code:

  | void myAtomicProcess(String a, String b)throws MyException{
  | 
  | //1. update db...
  | 
  | //2. update file ...
  | 
  | }	



If there is any exception while committing [at the end of method] , I want to rollback my changes done to file i,e restore the file as it was.

Please help me to achieve this.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151632#4151632

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151632



More information about the jboss-user mailing list