activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1367281 - in /activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo: BrokerProtocol.java OpenwireBrokerProtocol.java StompBrokerProtocol.java
Date Mon, 30 Jul 2012 20:41:40 GMT
Author: chirino
Date: Mon Jul 30 20:41:39 2012
New Revision: 1367281

URL: http://svn.apache.org/viewvc?rev=1367281&view=rev
Log:
Support configuring a connection prefetch setting.

Modified:
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java

Modified: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java?rev=1367281&r1=1367280&r2=1367281&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java
Mon Jul 30 20:41:39 2012
@@ -26,10 +26,7 @@ import org.apache.activemq.apollo.util.S
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.Queue;
-import javax.jms.Topic;
+import javax.jms.*;
 import java.net.InetSocketAddress;
 
 /**
@@ -111,4 +108,6 @@ abstract public class BrokerProtocol {
 
     public abstract Queue createQueue(String name);
     public abstract Topic createTopic(String name);
+
+    public abstract void setPrefetch(Connection connection, int value);
 }

Modified: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java?rev=1367281&r1=1367280&r2=1367281&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java
Mon Jul 30 20:41:39 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.apollo;
 
+import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
@@ -23,10 +24,7 @@ import org.apache.activemq.command.Activ
 
 import static java.lang.String.*;
 
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.Queue;
-import javax.jms.Topic;
+import javax.jms.*;
 
 /**
  * <p>
@@ -62,4 +60,9 @@ public class OpenwireBrokerProtocol exte
     public Topic createTopic(String name) {
         return new ActiveMQTopic(name);
     }
+
+    @Override
+    public void setPrefetch(Connection connection, int value) {
+        ((ActiveMQConnection)connection).getPrefetchPolicy().setAll(value);
+    }
 }

Modified: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java?rev=1367281&r1=1367280&r2=1367281&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java
Mon Jul 30 20:41:39 2012
@@ -16,15 +16,9 @@
  */
 package org.apache.activemq.apollo;
 
-import org.fusesource.stomp.jms.StompJmsConnectionFactory;
-import org.fusesource.stomp.jms.StompJmsDestination;
-import org.fusesource.stomp.jms.StompJmsQueue;
-import org.fusesource.stomp.jms.StompJmsTopic;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.Queue;
-import javax.jms.Topic;
+import org.fusesource.stomp.jms.*;
+
+import javax.jms.*;
 
 import static java.lang.String.format;
 
@@ -62,4 +56,9 @@ public class StompBrokerProtocol extends
     public Topic createTopic(String name) {
         return new StompJmsTopic("/topic/", name);
     }
+
+    @Override
+    public void setPrefetch(Connection connection, int value) {
+        ((StompJmsConnection)connection).setPrefetch(new StompJmsPrefetch(value));
+    }
 }



Mime
View raw message