2 Replies Latest reply on Nov 8, 2006 8:32 AM by markuslutz

    How to use UserTransactionSession...

    markuslutz

      Hi,

      my webapp is using a stateless session bean to read and write data to the database (BMT and JDBC - calls). Now I would like to wrap some remote function calls in a transaction i.e.

      InitialContext initialContext = new InitialContext(environment);
      MyHome myHome=(MyHome)initialContext.lookup("ejb/mybean");
      MyRemote myRemote=myHome.create();
      //code to wrap
       User user= myRemote.createUser()
       myRemote.createRights(user,listOfRights)
       //-----
      myRemote.remove();


      Is this possible with UserTransactionSession ? I couldn't find a documentation or any example how to use it .

      Thanks for any help
      Markus