2 Replies Latest reply on May 22, 2006 11:01 AM by bsturzoiu

    RequiredNew transaction type

    bsturzoiu

      Hi there
      I have a method inside of EJB EJB1: methodA() with Required.
      EJB1:methodA() call 2 others methods:
      EJB2:methodB(); - Required
      EJB3:methodC(); - RequiresNew

      If inside of EJB2:methodB() is catch an exception and inside of ot i have:
      this.setRollbackOnly();

      the method call EJB3:methodC(); produce any effect?

      Because in debug mode i observed that code is executed, but no effect in database remain.

      Thank you fo support

        • 1. Re: RequiredNew transaction type
          drabbit

          methodC should run in a separate transaction and commit upon completion.

          Your post doesn't show how you called methodB and methodC, so let me make sure: Did you call those methods over the local interface or just inside the bean implementation? The new Transaction is of course only started if the invocation passes the interceptor stack.

          dirk

          • 2. Re: RequiredNew transaction type
            bsturzoiu

            Hi guys.
            Was resolved this problem.
            Was related with some code write by a colegue
            That code when throws an error, also, made rollback

            Now this rollback is not throw when i call the code (using the local interface), it is throw only from remote implementation method.

            Thank you for support