geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: rev 53930 - geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound
Date Thu, 07 Oct 2004 02:07:27 GMT
Author: djencks
Date: Wed Oct  6 19:07:26 2004
New Revision: 53930

Modified:
   geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/AbstractConnectionManager.java
Log:
GERONIMO-265  Don't return a XAResource wrapper for recovery if the adapter doesn't supply
an XAResource

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/AbstractConnectionManager.java
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/AbstractConnectionManager.java
(original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/AbstractConnectionManager.java
Wed Oct  6 19:07:26 2004
@@ -97,9 +97,14 @@
 
     public ConnectionManagerFactory.ReturnableXAResource getRecoveryXAResource(ManagedConnectionFactory
managedConnectionFactory) throws ResourceException {
         ManagedConnectionInfo mci = new ManagedConnectionInfo(managedConnectionFactory, null);
+        NamedXAResource namedXAResource = (NamedXAResource) mci.getXAResource();
+        if (namedXAResource == null) {
+            //obviously, we can't do recovery.
+            return null;
+        }
         ConnectionInfo recoveryConnectionInfo = new ConnectionInfo(mci);
         recoveryStack.getConnection(recoveryConnectionInfo);
-        return new ConnectionManagerFactory.ReturnableXAResource((NamedXAResource) mci.getXAResource(),
recoveryStack, recoveryConnectionInfo);
+        return new ConnectionManagerFactory.ReturnableXAResource(namedXAResource, recoveryStack,
recoveryConnectionInfo);
     }
 
 

Mime
View raw message