activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1403690 - in /activemq/trunk/activemq-amqp/src: main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
Date Tue, 30 Oct 2012 13:31:16 GMT
Author: chirino
Date: Tue Oct 30 13:31:15 2012
New Revision: 1403690

URL: http://svn.apache.org/viewvc?rev=1403690&view=rev
Log:
Adding browser support.

Modified:
    activemq/trunk/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
    activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java

Modified: activemq/trunk/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java?rev=1403690&r1=1403689&r2=1403690&view=diff
==============================================================================
--- activemq/trunk/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
(original)
+++ activemq/trunk/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
Tue Oct 30 13:31:15 2012
@@ -57,6 +57,7 @@ class AmqpProtocolConverter {
     private static final Logger LOG = LoggerFactory.getLogger(AmqpProtocolConverter.class);
     static final public byte[] EMPTY_BYTE_ARRAY = new byte[]{};
     private final AmqpTransport amqpTransport;
+    private static final Symbol COPY = Symbol.getSymbol("copy");
 
     public AmqpProtocolConverter(AmqpTransport amqpTransport, BrokerContext brokerContext)
{
         this.amqpTransport = amqpTransport;
@@ -883,7 +884,10 @@ class AmqpProtocolConverter {
         consumerInfo.setDestination(dest);
         consumerInfo.setPrefetchSize(100);
         consumerInfo.setDispatchAsync(true);
-        Map filter = ((org.apache.qpid.proton.type.messaging.Source)remoteSource).getFilter();
+        if( source.getDistributionMode() == COPY) {
+            consumerInfo.setBrowser(true);
+        }
+        Map filter = ((org.apache.qpid.proton.type.messaging.Source)source).getFilter();
         if (filter != null) {
             DescribedType type = (DescribedType)filter.get(Symbol.valueOf("jms-selector"));
             consumerInfo.setSelector(type.getDescribed().toString());

Modified: activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java?rev=1403690&r1=1403689&r2=1403690&view=diff
==============================================================================
--- activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
(original)
+++ activemq/trunk/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
Tue Oct 30 13:31:15 2012
@@ -47,6 +47,7 @@ public class JoramJmsTest extends TestCa
         TestSuite suite = new TestSuite();
 
         // Passing tests
+        suite.addTestSuite(TemporaryQueueTest.class);
         suite.addTestSuite(ConnectionTest.class);
         suite.addTestSuite(SessionTest.class);
         suite.addTestSuite(JMSXPropertyTest.class);
@@ -57,21 +58,20 @@ public class JoramJmsTest extends TestCa
 
         if (false ) {
 
-// TODO: Fails due to temp destinations not being supported yet.
-        suite.addTestSuite(MessageHeaderTest.class);
-        suite.addTestSuite(TemporaryQueueTest.class);
-        suite.addTestSuite(TemporaryTopicTest.class);
 // TODO: Fails due to selectors not being implemented yet.
         suite.addTestSuite(SelectorSyntaxTest.class);
         suite.addTestSuite(SelectorTest.class);
         suite.addTestSuite(QueueSessionTest.class);
-// TODO: Browsers not yet supported.
+// TODO: Fails due to https://issues.apache.org/jira/browse/PROTON-110 and DestinationImpl
vs QueueImpl mapping issues
+        suite.addTestSuite(MessageHeaderTest.class);
+// TODO: Fails due to JMS client setup browser before getEnumeration() gets called.
         suite.addTestSuite(QueueBrowserTest.class);
 // TODO: Fails due to JMS client impl error.
         suite.addTestSuite(UnifiedSessionTest.class);
 // TODO: Fails due to inconsistent ObjectMessage mapping in the JMS client.
         suite.addTestSuite(MessageTypeTest.class);
 // TODO: Fails due to: javax.jms.IllegalStateException: Cannot set client-id to "publisherConnection";
client-id must be set on connection creation
+        suite.addTestSuite(TemporaryTopicTest.class);
         suite.addTestSuite(TopicConnectionTest.class);
         suite.addTestSuite(TopicSessionTest.class);
 



Mime
View raw message