Commit 4ec605e5 authored by Nicolas Tachker's avatar Nicolas Tachker

JORAM-83 : add the cnxEquals method.

parent 748a2a36
......@@ -27,6 +27,7 @@ import javax.jms.ConnectionConsumer;
import javax.jms.IllegalStateException;
import javax.jms.JMSException;
import javax.jms.Queue;
import javax.jms.QueueConnection;
import javax.jms.QueueSession;
import javax.jms.ServerSessionPool;
import javax.jms.Session;
......@@ -43,7 +44,7 @@ import fr.dyade.aaa.common.Debug;
* component to transparently use this physical connection possibly within
* a transaction (local or global).
*/
public class OutboundQueueConnection extends OutboundConnection implements javax.jms.QueueConnection {
public class OutboundQueueConnection extends OutboundConnection implements QueueConnection {
public static Logger logger = Debug.getLogger(OutboundQueueConnection.class.getName());
......@@ -95,4 +96,9 @@ public class OutboundQueueConnection extends OutboundConnection implements javax
throw new IllegalStateException("Forbidden call on a component's "
+ "connection.");
}
public boolean cnxEquals(Object obj) {
return (obj instanceof QueueConnection)
&& xac.equals(obj);
}
}
......@@ -29,6 +29,7 @@ import javax.jms.JMSException;
import javax.jms.ServerSessionPool;
import javax.jms.Session;
import javax.jms.Topic;
import javax.jms.TopicConnection;
import javax.jms.TopicSession;
import javax.jms.XATopicConnection;
......@@ -43,7 +44,7 @@ import fr.dyade.aaa.common.Debug;
* component to transparently use this physical connection possibly within
* a transaction (local or global).
*/
public class OutboundTopicConnection extends OutboundConnection implements javax.jms.TopicConnection {
public class OutboundTopicConnection extends OutboundConnection implements TopicConnection {
public static Logger logger = Debug.getLogger(OutboundTopicConnection.class.getName());
......@@ -103,4 +104,9 @@ public class OutboundTopicConnection extends OutboundConnection implements javax
throw new IllegalStateException("Forbidden call on a component's "
+ "connection.");
}
public boolean cnxEquals(Object obj) {
return (obj instanceof TopicConnection)
&& xac.equals(obj);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment