tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r983149 - in /openejb/branches/openejb-3.0.x: ./ container/openejb-core/src/main/java/org/apache/openejb/core/mdb/InboundRecovery.java container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainer.java
Date Sat, 07 Aug 2010 00:21:11 GMT
Author: djencks
Date: Sat Aug  7 00:21:10 2010
New Revision: 983149

URL: http://svn.apache.org/viewvc?rev=983149&view=rev
Log:
OPENEJB-1320 xa recovery on inbound resource adapters

Added:
    openejb/branches/openejb-3.0.x/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/InboundRecovery.java
      - copied unchanged from r982436, openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/InboundRecovery.java
Modified:
    openejb/branches/openejb-3.0.x/   (props changed)
    openejb/branches/openejb-3.0.x/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainer.java

Propchange: openejb/branches/openejb-3.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug  7 00:21:10 2010
@@ -1 +1 @@
-/openejb/trunk/openejb3:692706,720223,752633,808626
+/openejb/trunk/openejb3:692706,720223,752633,808626,982436

Modified: openejb/branches/openejb-3.0.x/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainer.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.0.x/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainer.java?rev=983149&r1=983148&r2=983149&view=diff
==============================================================================
--- openejb/branches/openejb-3.0.x/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainer.java
(original)
+++ openejb/branches/openejb-3.0.x/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainer.java
Sat Aug  7 00:21:10 2010
@@ -33,10 +33,12 @@ import org.apache.openejb.core.intercept
 import org.apache.openejb.core.transaction.TransactionContainer;
 import org.apache.openejb.core.transaction.TransactionContext;
 import org.apache.openejb.core.transaction.TransactionPolicy;
+import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.spi.SecurityService;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 
+import org.apache.openejb.util.Options;
 import org.apache.xbean.recipe.ObjectRecipe;
 import org.apache.xbean.recipe.Option;
 
@@ -70,6 +72,7 @@ public class MdbContainer implements Rpc
     private final boolean txRecovery;
 
     private final ConcurrentMap<Object, CoreDeploymentInfo> deployments = new ConcurrentHashMap<Object,
CoreDeploymentInfo>();
+    private final InboundRecovery inboundRecovery;
 
     public MdbContainer(Object containerID, TransactionManager transactionManager, SecurityService
securityService, ResourceAdapter resourceAdapter, Class messageListenerInterface, Class activationSpecClass,
int instanceLimit, boolean txRecovery) {
         this.containerID = containerID;
@@ -80,6 +83,7 @@ public class MdbContainer implements Rpc
         this.activationSpecClass = activationSpecClass;
         this.instanceLimit = instanceLimit;
         this.txRecovery = txRecovery;
+        inboundRecovery = SystemInstance.get().getComponent(InboundRecovery.class);
     }
 
     public DeploymentInfo [] deployments() {
@@ -122,6 +126,10 @@ public class MdbContainer implements Rpc
         // create the activation spec
         ActivationSpec activationSpec = createActivationSpec(deploymentInfo);
 
+        if (inboundRecovery != null) {
+            inboundRecovery.recover(resourceAdapter, activationSpec, containerID.toString());
+        }
+        
         // create the message endpoint
         MdbInstanceFactory instanceFactory = new MdbInstanceFactory(deploymentInfo, transactionManager,
securityService, instanceLimit);
         EndpointFactory endpointFactory = new EndpointFactory(activationSpec, this, deploymentInfo,
instanceFactory, txRecovery);



Mime
View raw message