Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-744

JTA EntityManager

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • JPA 1.0, 3.0
    • None
    • None

    Description

      Current Cayenne JPA EntityManager is always RESOURCE_LOCAL, i.e. it manages its own transactions via EntityTransaction interface. We need to support the JTA and RESOURCE_LOCAL managers. The details are described in chapter 5.9.2 of the specification. Specifically for JTA EntityManagers:

      • When EntityManagerFactory.createEntityManager is invoked, the provider must create and return a new entity manager. If a JTA transaction is active, the provider must register for synchronization notifications against the JTA transaction.
        • When EntityManager.joinTransaction is invoked, the provider must register for synchronization notifications against the current JTA transaction if a previous joinTransaction invocation for the transaction has not already been processed.
        • When the JTA transaction commits, the provider must flush all modified entity state to the database.
        • When the JTA transaction rolls back, the provider must detach all managed entities.

      .....

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: