1 Reply Latest reply on May 21, 2008 3:59 PM by Sandeep Kulkarni

    Local SSL process [method - CMT used] atomic operations issu

    Sandeep Kulkarni Newbie

      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.

      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.