activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: ARTEMIS-577 & ARTEMIS-596 Fixing API compatibility.
Date Mon, 27 Jun 2016 16:11:08 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 06adc4f07 -> 5dc5a242b


ARTEMIS-577 & ARTEMIS-596 Fixing API compatibility.

This is also fixing a build issue.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/5dc5a242
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/5dc5a242
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/5dc5a242

Branch: refs/heads/master
Commit: 5dc5a242bbf1eab6cc8c025f16606095ce224b73
Parents: 06adc4f
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Mon Jun 27 11:36:13 2016 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Jun 27 12:08:11 2016 -0400

----------------------------------------------------------------------
 .../core/management/ActiveMQServerControl.java  | 19 +++++++
 .../activemq/artemis/jms/bridge/JMSBridge.java  |  4 ++
 .../artemis/jms/bridge/impl/JMSBridgeImpl.java  | 28 ++++++----
 .../impl/ActiveMQServerControlImpl.java         | 55 +++++++++++++++++++
 .../byteman/JMSBridgeReconnectionTest.java      |  2 +-
 .../jms/bridge/JMSBridgeClusteredTest.java      |  4 +-
 .../jms/bridge/JMSBridgeReconnectionTest.java   | 12 ++---
 .../tests/extras/jms/bridge/JMSBridgeTest.java  | 56 ++++++++++----------
 .../ActiveMQServerControlUsingCoreTest.java     | 23 ++++++++
 9 files changed, 155 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5dc5a242/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
index de9bc9f..8ec70e4 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
@@ -706,6 +706,25 @@ public interface ActiveMQServerControl {
                      @Parameter(name = "user", desc = "User name") String user,
                      @Parameter(name = "password", desc = "User password") String password)
throws Exception;
 
+   @Operation(desc = "Create a Bridge", impact = MBeanOperationInfo.ACTION)
+   void createBridge(@Parameter(name = "name", desc = "Name of the bridge") String name,
+                     @Parameter(name = "queueName", desc = "Name of the source queue") String
queueName,
+                     @Parameter(name = "forwardingAddress", desc = "Forwarding address")
String forwardingAddress,
+                     @Parameter(name = "filterString", desc = "Filter of the brdige") String
filterString,
+                     @Parameter(name = "transformerClassName", desc = "Class name of the
bridge transformer") String transformerClassName,
+                     @Parameter(name = "retryInterval", desc = "Connection retry interval")
long retryInterval,
+                     @Parameter(name = "retryIntervalMultiplier", desc = "Connection retry
interval multiplier") double retryIntervalMultiplier,
+                     @Parameter(name = "initialConnectAttempts", desc = "Number of initial
connection attempts") int initialConnectAttempts,
+                     @Parameter(name = "reconnectAttempts", desc = "Number of reconnection
attempts") int reconnectAttempts,
+                     @Parameter(name = "useDuplicateDetection", desc = "Use duplicate detection")
boolean useDuplicateDetection,
+                     @Parameter(name = "confirmationWindowSize", desc = "Confirmation window
size") int confirmationWindowSize,
+                     @Parameter(name = "clientFailureCheckPeriod", desc = "Period to check
client failure") long clientFailureCheckPeriod,
+                     @Parameter(name = "staticConnectorNames", desc = "comma separated list
of connector names or name of discovery group if 'useDiscoveryGroup' is set to true") String
connectorNames,
+                     @Parameter(name = "useDiscoveryGroup", desc = "use discovery  group")
boolean useDiscoveryGroup,
+                     @Parameter(name = "ha", desc = "Is it using HA") boolean ha,
+                     @Parameter(name = "user", desc = "User name") String user,
+                     @Parameter(name = "password", desc = "User password") String password)
throws Exception;
+
    @Operation(desc = "Destroy a bridge", impact = MBeanOperationInfo.ACTION)
    void destroyBridge(@Parameter(name = "name", desc = "Name of the bridge") String name)
throws Exception;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5dc5a242/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
index a7e67c2..8e16aab 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/JMSBridge.java
@@ -108,4 +108,8 @@ public interface JMSBridge extends ActiveMQComponent {
 
    void setPasswordCodec(String codec);
 
+   JMSBridge setBridgeName(String name);
+
+   String getBridgeName();
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5dc5a242/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
index 53cd09d..157305c 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
@@ -84,7 +84,7 @@ public final class JMSBridgeImpl implements JMSBridge {
 
    private final Object lock = new Object();
 
-   private String bridgeName;
+   private String bridgeName = "N/A";
 
    private String sourceUsername;
 
@@ -195,8 +195,7 @@ public final class JMSBridgeImpl implements JMSBridge {
       executor = createExecutor();
    }
 
-   public JMSBridgeImpl(final String bridgeName,
-                        final ConnectionFactoryFactory sourceCff,
+   public JMSBridgeImpl(final ConnectionFactoryFactory sourceCff,
                         final ConnectionFactoryFactory targetCff,
                         final DestinationFactory sourceDestinationFactory,
                         final DestinationFactory targetDestinationFactory,
@@ -214,11 +213,10 @@ public final class JMSBridgeImpl implements JMSBridge {
                         final String clientID,
                         final boolean addMessageIDInHeader) {
 
-      this(bridgeName,sourceCff, targetCff, sourceDestinationFactory, targetDestinationFactory,
sourceUsername, sourcePassword, targetUsername, targetPassword, selector, failureRetryInterval,
maxRetries, qosMode, maxBatchSize, maxBatchTime, subName, clientID, addMessageIDInHeader,
null, null);
+      this(sourceCff, targetCff, sourceDestinationFactory, targetDestinationFactory, sourceUsername,
sourcePassword, targetUsername, targetPassword, selector, failureRetryInterval, maxRetries,
qosMode, maxBatchSize, maxBatchTime, subName, clientID, addMessageIDInHeader, null, null);
    }
 
-   public JMSBridgeImpl(final String bridgeName,
-                        final ConnectionFactoryFactory sourceCff,
+   public JMSBridgeImpl(final ConnectionFactoryFactory sourceCff,
                         final ConnectionFactoryFactory targetCff,
                         final DestinationFactory sourceDestinationFactory,
                         final DestinationFactory targetDestinationFactory,
@@ -237,11 +235,10 @@ public final class JMSBridgeImpl implements JMSBridge {
                         final boolean addMessageIDInHeader,
                         final MBeanServer mbeanServer,
                         final String objectName) {
-      this(bridgeName,sourceCff, targetCff, sourceDestinationFactory, targetDestinationFactory,
sourceUsername, sourcePassword, targetUsername, targetPassword, selector, failureRetryInterval,
maxRetries, qosMode, maxBatchSize, maxBatchTime, subName, clientID, addMessageIDInHeader,
mbeanServer, objectName, DEFAULT_FAILOVER_TIMEOUT);
+      this(sourceCff, targetCff, sourceDestinationFactory, targetDestinationFactory, sourceUsername,
sourcePassword, targetUsername, targetPassword, selector, failureRetryInterval, maxRetries,
qosMode, maxBatchSize, maxBatchTime, subName, clientID, addMessageIDInHeader, mbeanServer,
objectName, DEFAULT_FAILOVER_TIMEOUT);
    }
 
-   public JMSBridgeImpl(final String bridgeName,
-                        final ConnectionFactoryFactory sourceCff,
+   public JMSBridgeImpl(final ConnectionFactoryFactory sourceCff,
                         final ConnectionFactoryFactory targetCff,
                         final DestinationFactory sourceDestinationFactory,
                         final DestinationFactory targetDestinationFactory,
@@ -299,8 +296,6 @@ public final class JMSBridgeImpl implements JMSBridge {
 
       this.failoverTimeout = failoverTimeout;
 
-      this.bridgeName = bridgeName;
-
       checkParams();
 
       if (mbeanServer != null) {
@@ -331,6 +326,17 @@ public final class JMSBridgeImpl implements JMSBridge {
    // ActiveMQComponent overrides --------------------------------------------------
 
    @Override
+   public JMSBridgeImpl setBridgeName(String name) {
+      this.bridgeName = name;
+      return this;
+   }
+
+   @Override
+   public String getBridgeName() {
+      return bridgeName;
+   }
+
+   @Override
    public synchronized void start() throws Exception {
       synchronized (stoppingGuard) {
          stopping = false;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5dc5a242/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index 8202f14..710bb0e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -1766,6 +1766,61 @@ public class ActiveMQServerControlImpl extends AbstractControl implements
Active
       }
    }
 
+
+   @Override
+   public void createBridge(final String name,
+                            final String queueName,
+                            final String forwardingAddress,
+                            final String filterString,
+                            final String transformerClassName,
+                            final long retryInterval,
+                            final double retryIntervalMultiplier,
+                            final int initialConnectAttempts,
+                            final int reconnectAttempts,
+                            final boolean useDuplicateDetection,
+                            final int confirmationWindowSize,
+                            final long clientFailureCheckPeriod,
+                            final String staticConnectorsOrDiscoveryGroup,
+                            boolean useDiscoveryGroup,
+                            final boolean ha,
+                            final String user,
+                            final String password) throws Exception {
+      checkStarted();
+
+      clearIO();
+
+      try {
+         BridgeConfiguration config = new BridgeConfiguration()
+            .setName(name)
+            .setQueueName(queueName)
+            .setForwardingAddress(forwardingAddress)
+            .setFilterString(filterString)
+            .setTransformerClassName(transformerClassName)
+            .setClientFailureCheckPeriod(clientFailureCheckPeriod)
+            .setRetryInterval(retryInterval)
+            .setRetryIntervalMultiplier(retryIntervalMultiplier)
+            .setInitialConnectAttempts(initialConnectAttempts)
+            .setReconnectAttempts(reconnectAttempts)
+            .setUseDuplicateDetection(useDuplicateDetection)
+            .setConfirmationWindowSize(confirmationWindowSize)
+            .setHA(ha)
+            .setUser(user)
+            .setPassword(password);
+
+         if (useDiscoveryGroup) {
+            config.setDiscoveryGroupName(staticConnectorsOrDiscoveryGroup);
+         }
+         else {
+            config.setStaticConnectors(toList(staticConnectorsOrDiscoveryGroup));
+         }
+
+         server.deployBridge(config);
+      }
+      finally {
+         blockOnIO();
+      }
+   }
+
    @Override
    public void destroyBridge(final String name) throws Exception {
       checkStarted();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5dc5a242/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/JMSBridgeReconnectionTest.java
----------------------------------------------------------------------
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/JMSBridgeReconnectionTest.java
b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/JMSBridgeReconnectionTest.java
index b27a54b..7848f04 100644
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/JMSBridgeReconnectionTest.java
+++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/JMSBridgeReconnectionTest.java
@@ -55,7 +55,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase {
       activeMQServer = jmsServer1;
       ConnectionFactoryFactory factInUse0 = cff0;
       ConnectionFactoryFactory factInUse1 = cff1;
-      final JMSBridgeImpl bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse1,
sourceQueueFactory, targetQueueFactory, null, null, null, null, null, 1000, -1, QualityOfServiceMode.DUPLICATES_OK,
10, -1, null, null, false);
+      final JMSBridgeImpl bridge = new JMSBridgeImpl(factInUse0, factInUse1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 1000, -1, QualityOfServiceMode.DUPLICATES_OK,
10, -1, null, null, false).setBridgeName("test-bridge");
 
       addActiveMQComponent(bridge);
       bridge.setTransactionManager(newTransactionManager());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5dc5a242/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeClusteredTest.java
----------------------------------------------------------------------
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeClusteredTest.java
b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeClusteredTest.java
index 183dcb4..f04f590 100644
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeClusteredTest.java
+++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeClusteredTest.java
@@ -95,7 +95,7 @@ public class JMSBridgeClusteredTest extends ClusteredBridgeTestBase {
 
          //even number
          final int batchSize = 4;
-         bridge = new JMSBridgeImpl("test-bridge",sourceCFF, targetCFF, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 1000, -1, mode, batchSize, -1, null, null,
false);
+         bridge = new JMSBridgeImpl(sourceCFF, targetCFF, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 1000, -1, mode, batchSize, -1, null, null, false).setBridgeName("test-bridge");
 
          txMgr = newTransactionManager();
          bridge.setTransactionManager(txMgr);
@@ -154,7 +154,7 @@ public class JMSBridgeClusteredTest extends ClusteredBridgeTestBase {
          DestinationFactory sourceQueueFactory = sourceServer.getDestinationFactory(sourceQueueName);
          DestinationFactory targetQueueFactory = targetServer.getDestinationFactory(targetQueueName);
 
-         bridge = new JMSBridgeImpl("test-bridge",sourceCFF, targetCFF, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 1000, -1, mode, 10, 1000, null, null, false);
+         bridge = new JMSBridgeImpl(sourceCFF, targetCFF, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 1000, -1, mode, 10, 1000, null, null, false).setBridgeName("test-bridge");
 
          txMgr = newTransactionManager();
          bridge.setTransactionManager(txMgr);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5dc5a242/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeReconnectionTest.java
----------------------------------------------------------------------
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeReconnectionTest.java
b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeReconnectionTest.java
index 9af2d4c..a665b57 100644
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeReconnectionTest.java
+++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeReconnectionTest.java
@@ -107,7 +107,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase {
    public void testRetryConnectionOnStartup() throws Exception {
       jmsServer1.stop();
 
-      JMSBridgeImpl bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 1000, -1, QualityOfServiceMode.DUPLICATES_OK,
10, -1, null, null, false);
+      JMSBridgeImpl bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 1000, -1, QualityOfServiceMode.DUPLICATES_OK, 10, -1, null,
null, false).setBridgeName("test-bridge");
       bridge.setTransactionManager(newTransactionManager());
       addActiveMQComponent(bridge);
       bridge.start();
@@ -133,7 +133,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase {
    public void testStopBridgeWithFailureWhenStarted() throws Exception {
       jmsServer1.stop();
 
-      JMSBridgeImpl bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 500, -1, QualityOfServiceMode.DUPLICATES_OK,
10, -1, null, null, false);
+      JMSBridgeImpl bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 500, -1, QualityOfServiceMode.DUPLICATES_OK, 10, -1, null, null,
false).setBridgeName("test-bridge");
       bridge.setTransactionManager(newTransactionManager());
 
       bridge.start();
@@ -168,7 +168,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase {
          factInUse1 = cff1xa;
       }
 
-      bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 1000, -1, qosMode, 10, -1, null, null, false);
+      bridge = new JMSBridgeImpl(factInUse0, factInUse1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 1000, -1, qosMode, 10, -1, null, null, false).setBridgeName("test-bridge");
       addActiveMQComponent(bridge);
       bridge.setTransactionManager(newTransactionManager());
       bridge.start();
@@ -223,7 +223,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase {
    public void performCrashDestinationStopBridge() throws Exception {
       ConnectionFactoryFactory factInUse0 = cff0;
       ConnectionFactoryFactory factInUse1 = cff1;
-      final JMSBridgeImpl bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse1,
sourceQueueFactory, targetQueueFactory, null, null, null, null, null, 1000, -1, QualityOfServiceMode.DUPLICATES_OK,
10, -1, null, null, false);
+      final JMSBridgeImpl bridge = new JMSBridgeImpl(factInUse0, factInUse1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 1000, -1, QualityOfServiceMode.DUPLICATES_OK,
10, -1, null, null, false).setBridgeName("test-bridge");
 
       addActiveMQComponent(bridge);
       bridge.setTransactionManager(newTransactionManager());
@@ -294,7 +294,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase {
       DummyTransaction tx = new DummyTransaction();
       tm.tx = tx;
 
-      JMSBridgeImpl bridge = new JMSBridgeImpl("test-bridge",cff0xa, cff1xa, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 1000, -1, QualityOfServiceMode.ONCE_AND_ONLY_ONCE,
10, 5000, null, null, false);
+      JMSBridgeImpl bridge = new JMSBridgeImpl(cff0xa, cff1xa, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 1000, -1, QualityOfServiceMode.ONCE_AND_ONLY_ONCE, 10, 5000,
null, null, false).setBridgeName("test-bridge");
       addActiveMQComponent(bridge);
       bridge.setTransactionManager(tm);
 
@@ -379,7 +379,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase {
     * Verify all messages are received
     */
    private void performCrashAndReconnectDestCrashBeforePrepare(final boolean persistent)
throws Exception {
-      JMSBridgeImpl bridge = new JMSBridgeImpl("test-bridge",cff0xa, cff1xa, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 1000, -1, QualityOfServiceMode.ONCE_AND_ONLY_ONCE,
10, 5000, null, null, false);
+      JMSBridgeImpl bridge = new JMSBridgeImpl(cff0xa, cff1xa, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 1000, -1, QualityOfServiceMode.ONCE_AND_ONLY_ONCE, 10, 5000,
null, null, false).setBridgeName("test-bridge");
       addActiveMQComponent(bridge);
       bridge.setTransactionManager(newTransactionManager());
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5dc5a242/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeTest.java
----------------------------------------------------------------------
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeTest.java
b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeTest.java
index 701df96..17f364c 100644
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeTest.java
+++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeTest.java
@@ -335,7 +335,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE,
NUM_MESSAGES, -1, null, null, false);
+         bridge = new JMSBridgeImpl(factInUse0, factInUse1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, NUM_MESSAGES, -1,
null, null, false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -414,7 +414,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       String clientID = null;
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",null, cff1, sourceQueueFactory, targetQueueFactory,
sourceUsername, sourcePassword, destUsername, destPassword, selector, failureRetryInterval,
maxRetries, qosMode, batchSize, maxBatchTime, subName, clientID, false);
+         bridge = new JMSBridgeImpl(null, cff1, sourceQueueFactory, targetQueueFactory, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
batchSize, maxBatchTime, subName, clientID, false).setBridgeName("test-bridge");
          fail("expected exception");
       }
       catch (IllegalArgumentException e) {
@@ -425,7 +425,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",cff0, null, sourceQueueFactory, targetQueueFactory,
sourceUsername, sourcePassword, destUsername, destPassword, selector, failureRetryInterval,
maxRetries, qosMode, batchSize, maxBatchTime, subName, clientID, false);
+         bridge = new JMSBridgeImpl(cff0, null, sourceQueueFactory, targetQueueFactory, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
batchSize, maxBatchTime, subName, clientID, false).setBridgeName("test-bridge");
          fail("expected exception");
       }
       catch (IllegalArgumentException e) {
@@ -436,7 +436,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, null, targetQueueFactory, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
batchSize, maxBatchTime, subName, clientID, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, null, targetQueueFactory, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
batchSize, maxBatchTime, subName, clientID, false).setBridgeName("test-bridge");
          fail("expected exception");
       }
       catch (IllegalArgumentException e) {
@@ -447,7 +447,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, null, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
batchSize, maxBatchTime, subName, clientID, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, null, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
batchSize, maxBatchTime, subName, clientID, false).setBridgeName("test-bridge");
          fail("expected exception");
       }
       catch (IllegalArgumentException e) {
@@ -458,7 +458,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, targetQueueFactory,
sourceUsername, sourcePassword, destUsername, destPassword, selector, -2, maxRetries, qosMode,
batchSize, maxBatchTime, subName, clientID, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory, sourceUsername,
sourcePassword, destUsername, destPassword, selector, -2, maxRetries, qosMode, batchSize,
maxBatchTime, subName, clientID, false).setBridgeName("test-bridge");
          fail("expected exception");
       }
       catch (IllegalArgumentException e) {
@@ -469,7 +469,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, targetQueueFactory,
sourceUsername, sourcePassword, destUsername, destPassword, selector, -1, 10, qosMode, batchSize,
maxBatchTime, subName, clientID, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory, sourceUsername,
sourcePassword, destUsername, destPassword, selector, -1, 10, qosMode, batchSize, maxBatchTime,
subName, clientID, false).setBridgeName("test-bridge");
          fail("expected exception");
       }
       catch (IllegalArgumentException e) {
@@ -480,7 +480,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, null, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
0, maxBatchTime, subName, clientID, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, null, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
0, maxBatchTime, subName, clientID, false).setBridgeName("test-bridge");
          fail("expected exception");
       }
       catch (IllegalArgumentException e) {
@@ -491,7 +491,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, null, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
batchSize, -2, subName, clientID, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, null, sourceUsername,
sourcePassword, destUsername, destPassword, selector, failureRetryInterval, maxRetries, qosMode,
batchSize, -2, subName, clientID, false).setBridgeName("test-bridge");
          fail("expected exception");
       }
       catch (IllegalArgumentException e) {
@@ -513,7 +513,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null,
false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory, null,
null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null, false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -577,7 +577,7 @@ public class JMSBridgeTest extends BridgeTestBase {
 
          String selector = "vegetable='radish'";
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, selector, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null,
null, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory, null,
null, null, null, selector, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null,
false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -652,7 +652,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, targetQueueFactory,
"guest", mask, "guest", mask, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null,
null, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory, "guest",
mask, "guest", mask, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null,
false).setBridgeName("test-bridge");
 
          bridge.setUseMaskedPassword(true);
 
@@ -726,7 +726,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, targetQueueFactory,
"guest", mask, "guest", mask, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null,
null, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory, "guest",
mask, "guest", mask, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null,
false).setBridgeName("test-bridge");
 
          bridge.setUseMaskedPassword(true);
          bridge.setPasswordCodec(codec.getClass().getName() + ";key=bridgekey");
@@ -812,7 +812,7 @@ public class JMSBridgeTest extends BridgeTestBase {
 
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceTopicFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null,
false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceTopicFactory, targetQueueFactory, null,
null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null, false).setBridgeName("test-bridge");
          bridge.start();
 
          sendMessages(cf0, sourceTopic, 0, NUM_MESSAGES, false, largeMessage);
@@ -859,7 +859,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceTopicFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, batchSize, -1,
null, null, false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceTopicFactory, targetQueueFactory, null,
null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, batchSize, -1, null,
null, false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -890,7 +890,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceTopicFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, batchSize, -1,
"subTest", "clientid123", false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceTopicFactory, targetQueueFactory, null,
null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, batchSize, -1, "subTest",
"clientid123", false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -932,7 +932,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null,
on);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory, null,
null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null, on);
 
          bridge.start();
 
@@ -1107,7 +1107,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null,
messageIDInHeader);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory, null,
null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null, messageIDInHeader).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -1255,7 +1255,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null,
false);
+         bridge = new JMSBridgeImpl(cff0, cff1, sourceQueueFactory, targetQueueFactory, null,
null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null, false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -1339,7 +1339,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 5000, 10, qosMode, batchSize, -1, null,
null, false);
+         bridge = new JMSBridgeImpl(factInUse0, factInUse1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, qosMode, batchSize, -1, null, null, false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -1409,7 +1409,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 5000, 10, qosMode, 2, maxBatchTime, null,
null, false);
+         bridge = new JMSBridgeImpl(factInUse0, factInUse1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, qosMode, 2, maxBatchTime, null, null, false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -1477,7 +1477,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       }
 
       try {
-         bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse0, sourceQueueFactory,
localTargetQueueFactory, null, null, null, null, null, 5000, 10, qosMode, batchSize, -1, null,
null, false);
+         bridge = new JMSBridgeImpl(factInUse0, factInUse0, sourceQueueFactory, localTargetQueueFactory,
null, null, null, null, null, 5000, 10, qosMode, batchSize, -1, null, null, false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -1542,7 +1542,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 5000, 10, qosMode, NUM_MESSAGES, -1, null,
null, false);
+         bridge = new JMSBridgeImpl(factInUse0, factInUse1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 5000, 10, qosMode, NUM_MESSAGES, -1, null, null, false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -1599,7 +1599,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       try {
          final int NUM_MESSAGES = 10;
 
-         bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse0, sourceQueueFactory,
localTargetQueueFactory, null, null, null, null, null, 5000, 10, qosMode, NUM_MESSAGES, -1,
null, null, false);
+         bridge = new JMSBridgeImpl(factInUse0, factInUse0, sourceQueueFactory, localTargetQueueFactory,
null, null, null, null, null, 5000, 10, qosMode, NUM_MESSAGES, -1, null, null, false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -1658,7 +1658,7 @@ public class JMSBridgeTest extends BridgeTestBase {
 
          final int MAX_BATCH_SIZE = 100000; // something big so it won't reach it
 
-         bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse1, sourceQueueFactory,
targetQueueFactory, null, null, null, null, null, 3000, 10, qosMode, MAX_BATCH_SIZE, MAX_BATCH_TIME,
null, null, false);
+         bridge = new JMSBridgeImpl(factInUse0, factInUse1, sourceQueueFactory, targetQueueFactory,
null, null, null, null, null, 3000, 10, qosMode, MAX_BATCH_SIZE, MAX_BATCH_TIME, null, null,
false).setBridgeName("test-bridge");
 
          bridge.start();
 
@@ -1698,7 +1698,7 @@ public class JMSBridgeTest extends BridgeTestBase {
 
          final int MAX_BATCH_SIZE = 100000; // something big so it won't reach it
 
-         bridge = new JMSBridgeImpl("test-bridge",factInUse0, factInUse0, sourceQueueFactory,
localTargetQueueFactory, null, null, null, null, null, 3000, 10, qosMode, MAX_BATCH_SIZE,
MAX_BATCH_TIME, null, null, false);
+         bridge = new JMSBridgeImpl(factInUse0, factInUse0, sourceQueueFactory, localTargetQueueFactory,
null, null, null, null, null, 3000, 10, qosMode, MAX_BATCH_SIZE, MAX_BATCH_TIME, null, null,
false);
 
          bridge.start();
 
@@ -1731,7 +1731,7 @@ public class JMSBridgeTest extends BridgeTestBase {
 
       JMSBridgeImpl bridge = null;
       try {
-         bridge = new JMSBridgeImpl("test-bridge",cff0, cff0, sourceQueueFactory, localTargetQueueFactory,
null, null, null, null, null, 3000, 10, QualityOfServiceMode.ONCE_AND_ONLY_ONCE, 10000, 3000,
null, null, false);
+         bridge = new JMSBridgeImpl(cff0, cff0, sourceQueueFactory, localTargetQueueFactory,
null, null, null, null, null, 3000, 10, QualityOfServiceMode.ONCE_AND_ONLY_ONCE, 10000, 3000,
null, null, false).setBridgeName("test-bridge");
          bridge.start();
       }
       finally {
@@ -1747,7 +1747,7 @@ public class JMSBridgeTest extends BridgeTestBase {
       MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
       ObjectName objectName = new ObjectName("example.jmsbridge:service=JMSBridge");
 
-      JMSBridgeImpl bridge = new JMSBridgeImpl("test-bridge",cff0, cff0, sourceQueueFactory,
localTargetQueueFactory, null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE,
1, -1, null, null, false, mbeanServer, objectName.getCanonicalName());
+      JMSBridgeImpl bridge = new JMSBridgeImpl(cff0, cff0, sourceQueueFactory, localTargetQueueFactory,
null, null, null, null, null, 5000, 10, QualityOfServiceMode.AT_MOST_ONCE, 1, -1, null, null,
false, mbeanServer, objectName.getCanonicalName()).setBridgeName("test-bridge");
 
       Assert.assertTrue(mbeanServer.isRegistered(objectName));
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/5dc5a242/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
index 0eb77d4..2f979cc 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
@@ -656,6 +656,29 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
                                   int reconnectAttempts,
                                   boolean useDuplicateDetection,
                                   int confirmationWindowSize,
+                                  int producerWindowSize,
+                                  long clientFailureCheckPeriod,
+                                  String connectorNames,
+                                  boolean useDiscovery,
+                                  boolean ha,
+                                  String user,
+                                  String password) throws Exception {
+            proxy.invokeOperation("createBridge", name, queueName, forwardingAddress, filterString,
transformerClassName, retryInterval, retryIntervalMultiplier, initialConnectAttempts, reconnectAttempts,
useDuplicateDetection, confirmationWindowSize, producerWindowSize, clientFailureCheckPeriod,
connectorNames, useDiscovery, ha, user, password);
+         }
+
+
+         @Override
+         public void createBridge(String name,
+                                  String queueName,
+                                  String forwardingAddress,
+                                  String filterString,
+                                  String transformerClassName,
+                                  long retryInterval,
+                                  double retryIntervalMultiplier,
+                                  int initialConnectAttempts,
+                                  int reconnectAttempts,
+                                  boolean useDuplicateDetection,
+                                  int confirmationWindowSize,
                                   long clientFailureCheckPeriod,
                                   String connectorNames,
                                   boolean useDiscovery,


Mime
View raw message