[jboss-cvs] JBossAS SVN: r109883 - projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/switchboard.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Dec 13 16:12:21 EST 2010


Author: smarlow at redhat.com
Date: 2010-12-13 16:12:21 -0500 (Mon, 13 Dec 2010)
New Revision: 109883

Modified:
   projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceContextRefResource.java
Log:
JBJPA-33

Modified: projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceContextRefResource.java
===================================================================
--- projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceContextRefResource.java	2010-12-13 20:41:11 UTC (rev 109882)
+++ projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceContextRefResource.java	2010-12-13 21:12:21 UTC (rev 109883)
@@ -65,13 +65,15 @@
 
    /**
     * The PersistenceContext (PC) for a bean, is the EntityManager (EM) that
-    * will be used to access it.  Think of potentially, separate EM per bean
+    * will be used to access it.  Think of potentially, separate EM (different name) per bean
     * in the transaction but possibly the same Database connection shared for
-    * each EM (via EE sharing of managed connections).
+    * each EM (via EE sharing of managed connections).  Or same EM (same name) for each bean
+    * in the transaction.  The third case, would be separate EM (different name) per bean
+    * in the transaction and different resource managers (multiple DB servers).
     *
-    * The Extended PersistenceContext (XPC) identifies the EM to use for a set
-    * of session bean invocations that also reference the same XPC.  Think of
-    * one EM per transaction for the session beans.
+    * The Extended PersistenceContext (XPC) has the same capabilities as above, with an extended lifetime that
+    * is potentially long term.  Work done outside of a transaction, is queued up until the next transaction is
+    * committed or rolled back.  Work done inside of a transaction is committed like a PC would do.
     *
     * @return an object that can be bound that represents the target PersistentContext.
     */



More information about the jboss-cvs-commits mailing list