0 Replies Latest reply on Aug 8, 2007 7:34 AM by clemente.cioffi

    Transactions & Persistence Context

    clemente.cioffi

      HI,
      I'm figuring out how using the transactions and the persistence Context in a good way. My environment is : JbossAs 4.0.0, Seam 1.2 and Icefaces 1.6

      The back-end of my application is compounded by pojos with conversation scope that call stateless ejb3s which a Seam-managed Entity Manager is injected in.I'm not using the seam-managed transactions.
      I'd like to know If I can use the transaction demarcation on EJB3 methods.
      I tried that but It doesn't seem work.

      Example:
      beginning from front-end,I call a method on pojo that calls a method on EJB3 where some operations on DB are carried out.
      Now it seems that the transaction starts and then ends when the ejb3 method finishes.If during this method I call others methods of the same ejb or of others that has a
      @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
      a new transaction doesn't start.in fact the commit operation is always made at the end of the first ejb3 method called.
      So do you have some experience in that?
      Using the seam-managed transactions I have strange anomalies,somentimes the commit is made at the end of Ejb3 method,sometimes at the end of Pojo method.

      Can you help me?

      Thank you