activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/3] activemq-6 git commit: ACTIVEMQ6-69 remove deprecated items
Date Fri, 16 Jan 2015 14:50:34 GMT
Repository: activemq-6
Updated Branches:
  refs/heads/master f99a018a2 -> 9e673280b


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/fe1ba7ca/activemq-server/src/test/resources/shared-store-slave-hapolicy-config.xml
----------------------------------------------------------------------
diff --git a/activemq-server/src/test/resources/shared-store-slave-hapolicy-config.xml b/activemq-server/src/test/resources/shared-store-slave-hapolicy-config.xml
index 0f8bb71..05b6817 100644
--- a/activemq-server/src/test/resources/shared-store-slave-hapolicy-config.xml
+++ b/activemq-server/src/test/resources/shared-store-slave-hapolicy-config.xml
@@ -19,6 +19,9 @@
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="urn:activemq ../../../../activemq-server/src/main/resources/schema/activemq-server.xsd">
    <core xmlns="urn:activemq:core">
+      <discovery-groups>
+         <discovery-group name="wahey"/>
+      </discovery-groups>
       <ha-policy>
          <shared-store>
             <slave>
@@ -30,11 +33,10 @@
                   <!--a grouping of servers that can be scaled down to-->
                   <group-name>boo!</group-name>
                   <!--either a discovery group-->
-                  <discovery-group>wahey</discovery-group>
+                  <discovery-group-ref discovery-group-name="wahey"/>
                </scale-down>
             </slave>
          </shared-store>
       </ha-policy>
    </core>
-
 </configuration>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/fe1ba7ca/docs/user-manual/en/ha.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/ha.md b/docs/user-manual/en/ha.md
index bd12dd4..e9d2742 100644
--- a/docs/user-manual/en/ha.md
+++ b/docs/user-manual/en/ha.md
@@ -554,7 +554,7 @@ this would look like:
     <ha-policy>
        <live-only>
           <scale-down>
-             <discovery-group>my-discovery-group</discovery-group>
+             <discovery-group-ref discovery-group-name="my-discovery-group"/>
           </scale-down>
        </live-only>
     </ha-policy>
@@ -612,7 +612,7 @@ typical configuration would look like:
                    <!--a grouping of servers that can be scaled down to-->
                    <group-name>boo!</group-name>
                    <!--either a discovery group-->
-                   <discovery-group>wahey</discovery-group>
+                   <discovery-group-ref discovery-group-name="wahey"/>
                 </scale-down>
              </slave>
           </colocated>

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/fe1ba7ca/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/InterceptorTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/InterceptorTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/InterceptorTest.java
index 3395e61..9369cb5 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/InterceptorTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/InterceptorTest.java
@@ -667,7 +667,7 @@ public class InterceptorTest extends ServiceTestBase
          Assert.assertEquals("orange", message.getStringProperty(InterceptorTest.key));
       }
 
-      sf.getServerLocator().removeInterceptor(interceptor);
+      sf.getServerLocator().removeIncomingInterceptor(interceptor);
 
       for (int i = 0; i < numMessages; i++)
       {
@@ -982,7 +982,7 @@ public class InterceptorTest extends ServiceTestBase
          Assert.assertEquals(4, message.getIntProperty("d").intValue());
       }
 
-      sf.getServerLocator().removeInterceptor(interceptor2);
+      sf.getServerLocator().removeIncomingInterceptor(interceptor2);
 
       for (int i = 0; i < numMessages; i++)
       {

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/fe1ba7ca/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HangConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HangConsumerTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HangConsumerTest.java
index e953e83..071e782 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HangConsumerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/HangConsumerTest.java
@@ -428,7 +428,7 @@ public class HangConsumerTest extends ServiceTestBase
       HangInterceptor hangInt = new HangInterceptor();
       try
       {
-         locator.addInterceptor(hangInt);
+         locator.addIncomingInterceptor(hangInt);
 
          ClientSessionFactory factory = locator.createSessionFactory();
          ClientSession session = factory.createSession(false, false, false);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/fe1ba7ca/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedFailoverTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedFailoverTest.java
index 0e045b7..8596db3 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/failover/ReplicatedFailoverTest.java
@@ -81,7 +81,9 @@ public class ReplicatedFailoverTest extends FailoverTest
 
          crash(session);
 
-         liveServer.getServer().getConfiguration().setCheckForLiveServer(true);
+         ReplicatedPolicyConfiguration replicatedPolicyConfiguration = (ReplicatedPolicyConfiguration)
liveServer.getServer().getConfiguration().getHAPolicyConfiguration();
+
+         replicatedPolicyConfiguration.setCheckForLiveServer(true);
 
          liveServer.start();
 
@@ -95,7 +97,9 @@ public class ReplicatedFailoverTest extends FailoverTest
 
          crash(session);
 
-         liveServer.getServer().getConfiguration().setCheckForLiveServer(true);
+         replicatedPolicyConfiguration = (ReplicatedPolicyConfiguration) liveServer.getServer().getConfiguration().getHAPolicyConfiguration();
+
+         replicatedPolicyConfiguration.setCheckForLiveServer(true);
 
          liveServer.start();
 

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/fe1ba7ca/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java
index 52711fc..5f345e0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSQueueControlTest.java
@@ -439,7 +439,10 @@ public class JMSQueueControlTest extends ManagementTestBase
 
       Assert.assertNull(queueControl.getExpiryAddress());
 
-      queueControl.setExpiryAddress(expiryAddress);
+      AddressSettings addressSettings = new AddressSettings();
+      addressSettings.setExpiryAddress(new SimpleString(expiryAddress));
+      server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
+
       Assert.assertEquals(expiryAddress, queueControl.getExpiryAddress());
    }
 
@@ -469,7 +472,11 @@ public class JMSQueueControlTest extends ManagementTestBase
       String expiryQueueName = RandomUtil.randomString();
       ActiveMQQueue expiryQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue(expiryQueueName);
       serverManager.createQueue(false, expiryQueueName, null, true, expiryQueueName);
-      queueControl.setExpiryAddress(expiryQueue.getAddress());
+
+      AddressSettings addressSettings = new AddressSettings();
+      addressSettings.setExpiryAddress(new SimpleString(expiryQueue.getAddress()));
+      server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
+//      queueControl.setExpiryAddress(expiryQueue.getAddress());
 
       JMSQueueControl expiryQueueControl = ManagementControlHelper.createJMSQueueControl(expiryQueue,
mbeanServer);
 
@@ -595,7 +602,10 @@ public class JMSQueueControlTest extends ManagementTestBase
 
       Assert.assertNull(queueControl.getDeadLetterAddress());
 
-      queueControl.setDeadLetterAddress(deadLetterAddress);
+      AddressSettings addressSettings = new AddressSettings();
+      addressSettings.setDeadLetterAddress(new SimpleString(deadLetterAddress));
+      server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
+
       Assert.assertEquals(deadLetterAddress, queueControl.getDeadLetterAddress());
    }
 
@@ -606,6 +616,10 @@ public class JMSQueueControlTest extends ManagementTestBase
       serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
       ActiveMQQueue dlq = (ActiveMQQueue) ActiveMQJMSClient.createQueue(deadLetterQueue);
 
+      AddressSettings addressSettings = new AddressSettings();
+      addressSettings.setDeadLetterAddress(new SimpleString(dlq.getAddress()));
+      server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
+
       Connection conn = createConnection();
       Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
       MessageProducer producer = sess.createProducer(queue);
@@ -623,7 +637,7 @@ public class JMSQueueControlTest extends ManagementTestBase
       Assert.assertEquals(2, getMessageCount(queueControl));
       Assert.assertEquals(0, getMessageCount(dlqControl));
 
-      queueControl.setDeadLetterAddress(dlq.getAddress());
+//      queueControl.setDeadLetterAddress(dlq.getAddress());
 
       boolean movedToDeadLetterAddress = queueControl.sendMessageToDeadLetterAddress(message.getJMSMessageID());
       Assert.assertTrue(movedToDeadLetterAddress);
@@ -669,6 +683,10 @@ public class JMSQueueControlTest extends ManagementTestBase
       serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
       ActiveMQQueue dlq = (ActiveMQQueue) ActiveMQJMSClient.createQueue(deadLetterQueue);
 
+      AddressSettings addressSettings = new AddressSettings();
+      addressSettings.setDeadLetterAddress(new SimpleString(dlq.getAddress()));
+      server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
+
       Connection conn = createConnection();
       Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
@@ -682,7 +700,7 @@ public class JMSQueueControlTest extends ManagementTestBase
       Assert.assertEquals(2, getMessageCount(queueControl));
       Assert.assertEquals(0, getMessageCount(dlqControl));
 
-      queueControl.setDeadLetterAddress(dlq.getAddress());
+//      queueControl.setDeadLetterAddress(dlq.getAddress());
 
       int deadMessageCount = queueControl.sendMessagesToDeadLetterAddress(filter);
       Assert.assertEquals(1, deadMessageCount);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/fe1ba7ca/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/QueueControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/QueueControlTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/QueueControlTest.java
index 460da62..48f7a8e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/QueueControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/management/QueueControlTest.java
@@ -141,7 +141,10 @@ public class QueueControlTest extends ManagementTestBase
       session.createQueue(address, queue, null, false);
 
       QueueControl queueControl = createManagementControl(address, queue);
-      queueControl.setDeadLetterAddress(deadLetterAddress);
+
+      AddressSettings addressSettings = new AddressSettings();
+      addressSettings.setDeadLetterAddress(new SimpleString(deadLetterAddress));
+      server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings);
 
       Assert.assertEquals(deadLetterAddress, queueControl.getDeadLetterAddress());
 
@@ -186,7 +189,10 @@ public class QueueControlTest extends ManagementTestBase
       session.createQueue(address, queue, null, false);
 
       QueueControl queueControl = createManagementControl(address, queue);
-      queueControl.setExpiryAddress(expiryAddress);
+
+      AddressSettings addressSettings = new AddressSettings();
+      addressSettings.setExpiryAddress(new SimpleString(expiryAddress));
+      server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings);
 
       Assert.assertEquals(expiryAddress, queueControl.getExpiryAddress());
 
@@ -1425,7 +1431,10 @@ public class QueueControlTest extends ManagementTestBase
       Assert.assertEquals(1, messages.length);
       long messageID = (Long) messages[0].get("messageID");
 
-      queueControl.setExpiryAddress(expiryAddress.toString());
+      AddressSettings addressSettings = new AddressSettings();
+      addressSettings.setExpiryAddress(expiryAddress);
+      server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings);
+
       boolean expired = queueControl.expireMessage(messageID);
       Assert.assertTrue(expired);
       Assert.assertEquals(0, getMessageCount(queueControl));
@@ -1464,7 +1473,9 @@ public class QueueControlTest extends ManagementTestBase
       Assert.assertEquals(2, messages.length);
       long messageID = (Long) messages[0].get("messageID");
 
-      queueControl.setDeadLetterAddress(deadLetterAddress.toString());
+      AddressSettings addressSettings = new AddressSettings();
+      addressSettings.setDeadLetterAddress(deadLetterAddress);
+      server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings);
 
       Assert.assertEquals(0, getMessageCount(deadLetterQueueControl));
       boolean movedToDeadLetterAddress = queueControl.sendMessageToDeadLetterAddress(messageID);


Mime
View raw message