Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-1663

An extended persistence context should not be propagated if there is no JTA transaction

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 7.0.2.Final
    • 7.0.0.Final
    • JPA / Hibernate
    • None

      JPA 2.0 specification section 7.6.3.1 Requirements for Persistence Context Propagation:

      "
      Persistence contexts are propagated by the container across component invocations as follows.
      If a component is called and there is no JTA transaction or the JTA transaction is not propagated, the
      persistence context is not propagated.
      "

      For the case of a SFSB (with an extended persistence context XPC) method that is not in a JTA transaction, invoking a SLSB (with a transactional entity manager PC) method that requires a transaction. The SLSB method should not use the extended persistence context but should instead start a new persistence context instead for the duration of the SLSB transaction (will end at the method end).

            smarlow1@redhat.com Scott Marlow
            smarlow1@redhat.com Scott Marlow
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: