geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r985025 - /geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java
Date Thu, 12 Aug 2010 22:40:44 GMT
Author: kevan
Date: Thu Aug 12 22:40:43 2010
New Revision: 985025

URL: http://svn.apache.org/viewvc?rev=985025&view=rev
Log:
GERONIMO-5519 merge from branches 2.1 -- use the new more-async recovery code

Modified:
    geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java

Modified: geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java?rev=985025&r1=985024&r2=985025&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java
(original)
+++ geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java
Thu Aug 12 22:40:43 2010
@@ -20,13 +20,10 @@
 
 package org.apache.geronimo.openejb;
 
-import javax.resource.ResourceException;
 import javax.resource.spi.ActivationSpec;
 import javax.resource.spi.ResourceAdapter;
-import javax.transaction.xa.XAResource;
-import org.apache.geronimo.transaction.manager.NamedXAResource;
+import org.apache.geronimo.connector.ActivationSpecNamedXAResourceFactory;
 import org.apache.geronimo.transaction.manager.RecoverableTransactionManager;
-import org.apache.geronimo.transaction.manager.WrapperNamedXAResource;
 import org.apache.openejb.OpenEJBException;
 import org.apache.openejb.core.mdb.InboundRecovery;
 
@@ -42,15 +39,6 @@ public class GeronimoInboundRecovery imp
     }
 
     public void recover(ResourceAdapter resourceAdapter, ActivationSpec activationSpec, String
containerId) throws OpenEJBException {
-        try {
-            XAResource[] xaress = resourceAdapter.getXAResources(new ActivationSpec[] {activationSpec});
-            if (xaress == null || xaress.length == 0) {
-                return;
-            }
-            NamedXAResource xares = new WrapperNamedXAResource(xaress[0], containerId);
-            transactionManager.recoverResourceManager(xares);
-        } catch (ResourceException e) {
-            throw new OpenEJBException("Could not recover resource manager", e);
-        }
+        transactionManager.registerNamedXAResourceFactory(new ActivationSpecNamedXAResourceFactory(containerId,
activationSpec, resourceAdapter));
     }
 }



Mime
View raw message