1 2 Previous Next 15 Replies Latest reply on Aug 12, 2016 10:59 AM by serg_732173

    Nested Transactions. Nested call of EJBs from call of client from frontend

    serg_732173 Newbie

      Hello,

      does anybody knows such case and right operating?

       

      • client calls ejb1 through frontend
      • ejb1 (stateless) process and saves some info
      • ejb1 calls method ejb2 (stateless)
      • ejb2 access saved info by ejb1 and saves something too

       

      if Method of ejb2 has Annotation @TransactionAttribute(REQUIRES_NEW) than it works. In other case there is error. For example: javax.ejb.EJBTransactionRolledbackException: WFLYJPA0060: Transaction is required to perform this operation (either use a transaction or extended persistence context.

      Ejbs are injected simply (@Inject) in other Ejbs

       

      These calls must be one transaction to tell the truth. What is right solution and way? Or is there any problem in Transaction Management in Wildfly?

       

      Thanks in advance!

       

      @Tom Jenkinson

        1 2 Previous Next