You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2009/12/11 17:42:26 UTC
svn commit: r889690 - in /activemq/branches/activemq-5.3/activemq-core/src:
main/java/org/apache/activemq/broker/region/ test/java/org/apache/activemq/
test/java/org/apache/activemq/usecases/
Author: dejanb
Date: Fri Dec 11 16:42:25 2009
New Revision: 889690
URL: http://svn.apache.org/viewvc?rev=889690&view=rev
Log:
merging 889677 - https://issues.apache.org/activemq/browse/AMQ-2529 - browse over network
Added:
activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/usecases/BrowseOverNetworkTest.java
- copied unchanged from r889677, activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/BrowseOverNetworkTest.java
Modified:
activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueBrowserSubscription.java
activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
Modified: activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueBrowserSubscription.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueBrowserSubscription.java?rev=889690&r1=889689&r2=889690&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueBrowserSubscription.java (original)
+++ activemq/branches/activemq-5.3/activemq-core/src/main/java/org/apache/activemq/broker/region/QueueBrowserSubscription.java Fri Dec 11 16:42:25 2009
@@ -67,6 +67,9 @@
*/
protected void acknowledge(ConnectionContext context, final MessageAck ack, final MessageReference n)
throws IOException {
+ if (info.isNetworkSubscription()) {
+ super.acknowledge(context, ack, n);
+ }
}
synchronized public void incrementQueueRef() {
Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java?rev=889690&r1=889689&r2=889690&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java (original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java Fri Dec 11 16:42:25 2009
@@ -36,6 +36,8 @@
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.QueueBrowser;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.Topic;
@@ -215,6 +217,14 @@
}
return null;
}
+
+ protected QueueBrowser createBrowser(String brokerName, Destination dest) throws Exception {
+ BrokerItem brokerItem = brokers.get(brokerName);
+ if (brokerItem != null) {
+ return brokerItem.createBrowser(dest);
+ }
+ return null;
+ }
protected MessageConsumer createDurableSubscriber(String brokerName, Topic dest, String name) throws Exception {
BrokerItem brokerItem = brokers.get(brokerName);
@@ -420,6 +430,13 @@
consumers.put(client, messageIdList);
return client;
}
+
+ public QueueBrowser createBrowser(Destination dest) throws Exception {
+ Connection c = createConnection();
+ c.start();
+ Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ return s.createBrowser((Queue)dest);
+ }
public MessageConsumer createDurableSubscriber(Topic dest, String name) throws Exception {
Connection c = createConnection();