qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject svn commit: r583649 - /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Date Thu, 11 Oct 2007 00:23:26 GMT
Author: rajith
Date: Wed Oct 10 17:23:25 2007
New Revision: 583649

URL: http://svn.apache.org/viewvc?rev=583649&view=rev
Log:
There was an interop issue.
The broker used window as default mode and the java client is using credit as default mode.
This resulted in a test failure.

I modified the java client to explictly state credit mode for sync receive.


Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=583649&r1=583648&r2=583649&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Wed Oct 10 17:23:25 2007
@@ -345,6 +345,7 @@
                                           consumer.isNoLocal() ? Option.NO_LOCAL : Option.NO_OPTION,
                                           consumer.isExclusive() ? Option.EXCLUSIVE : Option.NO_OPTION);
 
+        getQpidSession().messageFlowMode(consumer.getConsumerTag().toString(), Session.MESSAGE_FLOW_MODE_CREDIT);
         getQpidSession().messageFlow(consumer.getConsumerTag().toString(), Session.MESSAGE_FLOW_UNIT_BYTE,
0xFFFFFFFF);
         // We need to sync so that we get notify of an error.
         getQpidSession().sync();
@@ -438,8 +439,6 @@
             for (BasicMessageConsumer consumer : _consumers.values())
             {
                 getQpidSession().messageStop(consumer.getConsumerTag().toString());
-                getQpidSession().messageFlowMode(consumer.getConsumerTag().toString(), Session.MESSAGE_FLOW_MODE_CREDIT);
-                getQpidSession().messageFlow(consumer.getConsumerTag().toString(), Session.MESSAGE_FLOW_UNIT_BYTE,
0xFFFFFFFF);
             }
         }
         else
@@ -451,13 +450,11 @@
                 {
                     if (consumer.getMessageListener() != null)
                     {
-                        getQpidSession().messageFlowMode(consumer.getConsumerTag().toString(),
Session.MESSAGE_FLOW_MODE_WINDOW);
                         getQpidSession().messageFlow(consumer.getConsumerTag().toString(),
Session.MESSAGE_FLOW_UNIT_MESSAGE,
                                                      MAX_PREFETCH);
-                        // todo this
-                        getQpidSession()
-                                .messageFlow(consumer.getConsumerTag().toString(), Session.MESSAGE_FLOW_UNIT_BYTE,
0xFFFFFFFF);
                     }
+                    getQpidSession()
+                    .messageFlow(consumer.getConsumerTag().toString(), Session.MESSAGE_FLOW_UNIT_BYTE,
0xFFFFFFFF);
                 }
                 catch(Exception e)
                 {



Mime
View raw message