4 Replies Latest reply on May 24, 2003 3:41 AM by jbrosenberg

    Transactions and Stateless Session EJB's

    jbrosenberg Newbie

      I am new to jBoss, I was just reading the free getting started doc for 3.0....

      In several places, it suggested that method calls into a stateless session EJB must always start a new transaction at the beginning and commit or rollback the transaction before returning....

      Is that right?

      I don't quite understand why that would be a requirement? Certainly this is not the behavior in Weblogic, for instance....

      It was using the argument that because it's stateless and you can't ever get back to the same state with subsequent calls to the same ejb, that you need to commit all data before returning....This of course makes no sense if you are calling a stateless method
      from within other ejb code, from within a transaction, etc....Or if one stateless method calls another within a transaction...

      Was this just a misinterpretation on my part, or is it a recommendation? Or does the container actually force this behavior?