From dcc7b11347fbaa91e6e387fdb8b0dfd67f719287 Mon Sep 17 00:00:00 2001 From: mfrazier Date: Fri, 29 May 2015 16:13:41 -0700 Subject: [PATCH] AMQ-5713 - making accessors public to remove startup error. Includes unit test DestinationBridgeAccessorsTest which replicated the problem and now passes. --- .../network/jms/DestinationBridge.java | 4 +- .../xbean/DestinationBridgeAccessorsTest.java | 20 ++++++++++ .../test/resources/handleReplyToActivemq.xml | 38 +++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 activemq-unit-tests/src/test/java/org/apache/activemq/xbean/DestinationBridgeAccessorsTest.java create mode 100644 activemq-unit-tests/src/test/resources/handleReplyToActivemq.xml diff --git a/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java b/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java index ff0f0766e3..7fc42d17b2 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java +++ b/activemq-broker/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java @@ -154,14 +154,14 @@ public abstract class DestinationBridge implements Service, MessageListener { /** * @return Returns the doHandleReplyTo. */ - protected boolean isDoHandleReplyTo() { + public boolean isDoHandleReplyTo() { return doHandleReplyTo; } /** * @param doHandleReplyTo The doHandleReplyTo to set. */ - protected void setDoHandleReplyTo(boolean doHandleReplyTo) { + public void setDoHandleReplyTo(boolean doHandleReplyTo) { this.doHandleReplyTo = doHandleReplyTo; } diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/xbean/DestinationBridgeAccessorsTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/xbean/DestinationBridgeAccessorsTest.java new file mode 100644 index 0000000000..35725a35e0 --- /dev/null +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/xbean/DestinationBridgeAccessorsTest.java @@ -0,0 +1,20 @@ +package org.apache.activemq.xbean; + +import java.net.URI; + +import org.apache.activemq.broker.BrokerService; +import org.junit.Assert; +import org.junit.Test; + +public class DestinationBridgeAccessorsTest extends Assert { + + @Test + public void testCreateBroker() throws Exception { + XBeanBrokerFactory xBeanBrokerFactory = new XBeanBrokerFactory(); + + BrokerService broker = xBeanBrokerFactory.createBroker(new URI("handleReplyToActivemq.xml")); + + assertNotNull(broker); + } + +} \ No newline at end of file diff --git a/activemq-unit-tests/src/test/resources/handleReplyToActivemq.xml b/activemq-unit-tests/src/test/resources/handleReplyToActivemq.xml new file mode 100644 index 0000000000..5986fd6568 --- /dev/null +++ b/activemq-unit-tests/src/test/resources/handleReplyToActivemq.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + +