Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3105

Container-managed EXTENDED persistence context is always joined with transaction even if UNSYNCHRONIZED

    XMLWordPrintable

Details

    Description

      https://github.com/weld/wildfly/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/transaction/UnsynchronizedSFSB.jav

      Change this test to

      @PersistenceContext(type = EXTENDED, synchronization = UNSYNCHRONIZED)

      and it will break.

      Looks like an extended PC is always joined to the transaction and flushed on commit, the unsynchronized mode is ignored. From what I can see this is not specified and indeed would make the whole new UNSYNCHRONIZED feature kind of pointless. It's primary use case is propagation of unflushed/unsynchronized extended PC from a SFSB to other beans while keeping transactions intact.

      Attachments

        Activity

          People

            smarlow1@redhat.com Scott Marlow
            christian.bauer_jira Christian Bauer (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: