1 Reply Latest reply on Jun 10, 2013 9:52 AM by Martin Kouba

    @Transactional and @TransactionScoped

    Juergen Zimmermann Master

      I need some assistance in basic understanding of CDI 1.1 and JTA 1.2:

      1) If I want the public methods of a JAX-RS resource (and CDI-managed) class to be transactional, then I would just implement the following. Is this correct?

      @Transactional

      @Path(...)

      public class MyResource {

      @Inject

      public MySharedLogic msl;  // shared logic for RESTful WS and Web/JSF/CDI

      }

       

      2) If issue 1) is correct, do I still have to annotate the class MySharedLogic with @TransactionScoped ?