geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r982438 - in /geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb: GeronimoInboundRecovery.java OpenEjbSystemGBean.java
Date Thu, 05 Aug 2010 00:19:02 GMT
Author: djencks
Date: Thu Aug  5 00:19:02 2010
New Revision: 982438

URL: http://svn.apache.org/viewvc?rev=982438&view=rev
Log:
GERONIMO-5501 support xa recovery on inbound resource adapters

Added:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java
Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java

Added: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java?rev=982438&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java
(added)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GeronimoInboundRecovery.java
Thu Aug  5 00:19:02 2010
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.openejb;
+
+import javax.resource.spi.ActivationSpec;
+import javax.resource.spi.ResourceAdapter;
+import org.apache.geronimo.connector.ResourceAdapterWrapper;
+import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.core.mdb.InboundRecovery;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class GeronimoInboundRecovery implements InboundRecovery {
+
+    public void recover(ResourceAdapter resourceAdapter, ActivationSpec activationSpec, String
containerId) throws OpenEJBException {
+        ((ResourceAdapterWrapper)resourceAdapter).doRecovery(activationSpec, containerId);
+    }
+}

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java?rev=982438&r1=982437&r2=982438&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
Thu Aug  5 00:19:02 2010
@@ -67,6 +67,7 @@ import org.apache.openejb.config.ClientM
 import org.apache.openejb.config.ConfigurationFactory;
 import org.apache.openejb.config.EjbModule;
 import org.apache.openejb.core.ServerFederation;
+import org.apache.openejb.core.mdb.InboundRecovery;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.resource.XAResourceWrapper;
 import org.apache.openejb.resource.GeronimoTransactionManagerFactory.GeronimoXAResourceWrapper;
@@ -141,6 +142,8 @@ public class OpenEjbSystemGBean implemen
         assembler.createTransactionManager(transactionServiceInfo);
 	    SystemInstance.get().setComponent(XAResourceWrapper.class, new GeronimoXAResourceWrapper());
 
+        SystemInstance.get().setComponent(InboundRecovery.class, new GeronimoInboundRecovery());
+
         // install security service
         SecurityService securityService = new GeronimoSecurityService();
         SecurityServiceInfo securityServiceInfo = new SecurityServiceInfo();



Mime
View raw message