[JIRA] Created: (CAY-744) JTA EntityManager

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Sat Feb 03 2007 - 09:47:50 EST

  • Next message: Andrus Adamchik: "Re: Refactoring of the JPA provider packages"

    JTA EntityManager
    -----------------

                     Key: CAY-744
                     URL: https://issues.apache.org/cayenne/browse/CAY-744
                 Project: Cayenne
              Issue Type: Task
              Components: Cayenne JPA
        Affects Versions: 3.0
                Reporter: Andrus Adamchik
             Assigned To: Andrus Adamchik
                 Fix For: 3.0

    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.

    .....

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Sat Feb 03 2007 - 09:48:22 EST