User: chirino
Date: 01/12/08 21:56:36
Modified: src/main/org/jboss/mq Connection.java Subscription.java
Log:
updated the dc variable to connectionToken. more readable.
fixed the NoLocal bug that was reported on the user forums.
testcase in the suite shows now that it is working.
Revision Changes Path
1.14 +2 -2 jbossmq/src/main/org/jboss/mq/Connection.java
Index: Connection.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/Connection.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Connection.java 2001/11/26 06:33:11 1.13
+++ Connection.java 2001/12/09 05:56:36 1.14
@@ -36,7 +36,7 @@
*
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
- * @version $Revision: 1.13 $
+ * @version $Revision: 1.14 $
* @created August 16, 2001
*/
public class Connection implements java.io.Serializable, javax.jms.Connection
@@ -816,7 +816,7 @@
Subscription req = consumer.getSubscription();
req.subscriptionId = subscriptionCounter++;
- req.dc = connectionToken;
+ req.connectionToken = connectionToken;
if( log.isTraceEnabled() )
log.trace("Connection: addConsumer(dest=" + req.destination.toString() +
")");
1.5 +9 -6 jbossmq/src/main/org/jboss/mq/Subscription.java
Index: Subscription.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/Subscription.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Subscription.java 2001/10/28 04:07:34 1.4
+++ Subscription.java 2001/12/09 05:56:36 1.5
@@ -11,6 +11,7 @@
import javax.jms.JMSException;
import org.jboss.mq.selectors.Selector;
+import org.jboss.logging.Logger;
/**
* This class contains all the data needed to for a the provider to to
@@ -19,12 +20,12 @@
* @author Hiram Chirino ([EMAIL PROTECTED])
* @author David Maplesden ([EMAIL PROTECTED])
* @created August 16, 2001
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class Subscription
implements Serializable
-{
- /** This gets set to a unique value at the SpyConnection. */
+{
+ /** This gets set to a unique value at the SpyConnection. */
public int subscriptionId;
/** The queue we want to subscribe to. */
@@ -41,7 +42,7 @@
// Transient Values
public transient Selector selector;
- public transient ConnectionToken dc;
+ public transient ConnectionToken connectionToken;
public transient Object clientConsumer; // = null;
/**
@@ -64,9 +65,11 @@
*/
public boolean accepts(SpyMessage.Header header) throws JMSException {
if (header.jmsDestination instanceof SpyTopic) {
+
// In the Topic case we allways deliver unless we have a noLocal
- if (noLocal && header.producerClientId.equals(dc.getClientID())) {
- return false;
+ if (noLocal ) {
+ if( header.producerClientId.equals(connectionToken.getClientID()))
+ return false;
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development