summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorWeston M. Price <wprice@apache.org>2012-06-11 12:42:26 +0000
committerWeston M. Price <wprice@apache.org>2012-06-11 12:42:26 +0000
commita7eccc7e5526051ef3ed398051cd8fc96b03310c (patch)
treeecffd4909f366542cbb27eac37bfddbebf790dbf /java
parentc20cd1e96b67621d2109da9d471a884716ca2c26 (diff)
downloadqpid-python-a7eccc7e5526051ef3ed398051cd8fc96b03310c.tar.gz
QPID-4034: XASessionImpl should override resubscribe() for correct XA
failover behavior *Implemented resubscribe() in XASessionImpl *Minor cleanup, fixed typos etc git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1348825 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java b/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java
index f2efb6e8a5..05bd121bbd 100644
--- a/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java
+++ b/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java
@@ -17,6 +17,7 @@
*/
package org.apache.qpid.client;
+import org.apache.qpid.AMQException;
import org.apache.qpid.client.message.MessageFactoryRegistry;
import org.apache.qpid.transport.RangeSet;
@@ -31,7 +32,7 @@ import javax.jms.XATopicSession;
import javax.transaction.xa.XAResource;
/**
- * This is an implementation of the javax.njms.XASEssion interface.
+ * This is an implementation of the javax.jms.XASession interface.
*/
public class XASessionImpl extends AMQSession_0_10 implements XASession, XATopicSession, XAQueueSession
{
@@ -67,7 +68,7 @@ public class XASessionImpl extends AMQSession_0_10 implements XASession, XATopic
{
this(qpidConnection, con, channelId, false, ackMode, MessageFactoryRegistry.newDefaultRegistry(),
defaultPrefetchHigh, defaultPrefetchLow, null);
-
+
}
public XASessionImpl(org.apache.qpid.transport.Connection qpidConnection, AMQConnection con, int channelId,
@@ -92,9 +93,6 @@ public class XASessionImpl extends AMQSession_0_10 implements XASession, XATopic
_qpidDtxSession.dtxSelect();
}
-
- // javax.njms.XASEssion API
-
/**
* Gets the session associated with this XASession.
*
@@ -192,4 +190,11 @@ public class XASessionImpl extends AMQSession_0_10 implements XASession, XATopic
super.acknowledgeImpl() ;
}
}
+
+ @Override
+ void resubscribe() throws AMQException
+ {
+ super.resubscribe();
+ createSession();
+ }
}