activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-197 fixing examples by using proper location on folders
Date Wed, 21 Oct 2015 21:03:18 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master b89e3f53b -> 2d3177a45


ARTEMIS-197 fixing examples by using proper location on folders


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

Branch: refs/heads/master
Commit: 9a986848468cc996e1900605d533380e21cdf317
Parents: b89e3f5
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Wed Oct 21 16:43:10 2015 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Oct 21 16:43:10 2015 -0400

----------------------------------------------------------------------
 .../core/server/cluster/ha/ColocatedHAManager.java      | 12 ++++++------
 .../jms/example/ColocatedFailoverScaleDownExample.java  |  6 ++++--
 .../src/main/resources/activemq/server0/broker.xml      |  8 ++++----
 .../src/main/resources/activemq/server1/broker.xml      |  8 ++++----
 .../artemis/jms/example/ColocatedFailoverExample.java   |  6 ++++--
 .../src/main/resources/activemq/server0/broker.xml      |  8 ++++----
 .../src/main/resources/activemq/server1/broker.xml      |  8 ++++----
 examples/features/ha/pom.xml                            | 10 ++--------
 8 files changed, 32 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9a986848/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java
index f3b6f22..d35bccb 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java
@@ -16,6 +16,11 @@
  */
 package org.apache.activemq.artemis.core.server.cluster.ha;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.activemq.artemis.api.core.Pair;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
@@ -27,11 +32,6 @@ import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
 import org.apache.activemq.artemis.core.server.cluster.ClusterControl;
 import org.apache.activemq.artemis.core.server.cluster.ClusterController;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 public class ColocatedHAManager implements HAManager {
 
    private final ColocatedPolicy haPolicy;
@@ -129,7 +129,7 @@ public class ColocatedHAManager implements HAManager {
             return clusterControl.requestReplicatedBackup(backupSize, server.getNodeID());
          }
          else {
-            return clusterControl.requestSharedStoreBackup(backupSize, server.getConfiguration().getJournalDirectory(),
server.getConfiguration().getBindingsDirectory(), server.getConfiguration().getLargeMessagesDirectory(),
server.getConfiguration().getPagingDirectory());
+            return clusterControl.requestSharedStoreBackup(backupSize, server.getConfiguration().getJournalLocation().getAbsolutePath(),
server.getConfiguration().getBindingsLocation().getAbsolutePath(), server.getConfiguration().getLargeMessagesLocation().getAbsolutePath(),
server.getConfiguration().getPagingLocation().getAbsolutePath());
 
          }
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9a986848/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java
----------------------------------------------------------------------
diff --git a/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java
b/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java
index c3a87ec..08683ab 100644
--- a/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java
+++ b/examples/features/ha/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java
@@ -16,8 +16,6 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
-import org.apache.activemq.artemis.util.ServerUtil;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.MessageConsumer;
@@ -28,6 +26,8 @@ import javax.jms.TextMessage;
 import javax.naming.InitialContext;
 import java.util.Hashtable;
 
+import org.apache.activemq.artemis.util.ServerUtil;
+
 /**
  * A simple example that demonstrates server side load-balancing of messages between the
queue instances on different
  * nodes of the cluster.
@@ -51,6 +51,8 @@ public class ColocatedFailoverScaleDownExample {
          server0 = ServerUtil.startServer(args[0], ColocatedFailoverScaleDownExample.class.getSimpleName()
+ "0", 0, 5000);
          server1 = ServerUtil.startServer(args[1], ColocatedFailoverScaleDownExample.class.getSimpleName()
+ "1", 1, 5000);
 
+         Thread.sleep(3000);
+
          // Step 1. Get an initial context for looking up JNDI for both servers
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9a986848/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server0/broker.xml
b/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server0/broker.xml
index 60201ca..d5fcbf8 100644
--- a/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir:../data}/bindings</bindings-directory>
+      <bindings-directory>./data/bindings</bindings-directory>
 
-      <journal-directory>${data.dir:../data}/journal</journal-directory>
+      <journal-directory>./data/journal</journal-directory>
 
-      <large-messages-directory>${data.dir:../data}/largemessages</large-messages-directory>
+      <large-messages-directory>./data/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir:../data}/paging</paging-directory>
+      <paging-directory>./data/paging</paging-directory>
       <!-- Connectors -->
 
       <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9a986848/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server1/broker.xml
b/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server1/broker.xml
index 7892fc1..d849b10 100644
--- a/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server1/broker.xml
@@ -29,13 +29,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir:../data}/bindings</bindings-directory>
+      <bindings-directory>./data/bindings</bindings-directory>
 
-      <journal-directory>${data.dir:../data}/journal</journal-directory>
+      <journal-directory>./data/journal</journal-directory>
 
-      <large-messages-directory>${data.dir:../data}/largemessages</large-messages-directory>
+      <large-messages-directory>./data/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir:../data}/paging</paging-directory>
+      <paging-directory>./data/paging</paging-directory>
 
       <!-- Connectors -->
       <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9a986848/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java
b/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java
index 3e0d07e..ac88238 100644
--- a/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java
+++ b/examples/features/ha/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java
@@ -16,8 +16,6 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
-import org.apache.activemq.artemis.util.ServerUtil;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.MessageConsumer;
@@ -28,6 +26,8 @@ import javax.jms.TextMessage;
 import javax.naming.InitialContext;
 import java.util.Hashtable;
 
+import org.apache.activemq.artemis.util.ServerUtil;
+
 /**
  * A simple example that demonstrates a colocated server
  */
@@ -50,6 +50,8 @@ public class ColocatedFailoverExample {
          server0 = ServerUtil.startServer(args[0], ColocatedFailoverExample.class.getSimpleName()
+ "0", 0, 5000);
          server1 = ServerUtil.startServer(args[1], ColocatedFailoverExample.class.getSimpleName()
+ "1", 1, 5000);
 
+         Thread.sleep(3000);
+
          // Step 1. Get an initial context for looking up JNDI for both servers
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9a986848/examples/features/ha/colocated-failover/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/ha/colocated-failover/src/main/resources/activemq/server0/broker.xml
b/examples/features/ha/colocated-failover/src/main/resources/activemq/server0/broker.xml
index 0a4103f..f569d39 100644
--- a/examples/features/ha/colocated-failover/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/colocated-failover/src/main/resources/activemq/server0/broker.xml
@@ -29,13 +29,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir:../data}/bindings</bindings-directory>
+      <bindings-directory>./data/bindings</bindings-directory>
 
-      <journal-directory>${data.dir:../data}/journal</journal-directory>
+      <journal-directory>./data/journal</journal-directory>
 
-      <large-messages-directory>${data.dir:../data}/largemessages</large-messages-directory>
+      <large-messages-directory>./data/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir:../data}/paging</paging-directory>
+      <paging-directory>./data/paging</paging-directory>
       <!-- Connectors -->
 
       <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9a986848/examples/features/ha/colocated-failover/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/ha/colocated-failover/src/main/resources/activemq/server1/broker.xml
b/examples/features/ha/colocated-failover/src/main/resources/activemq/server1/broker.xml
index 8083f27..71015e5 100644
--- a/examples/features/ha/colocated-failover/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/colocated-failover/src/main/resources/activemq/server1/broker.xml
@@ -29,13 +29,13 @@ under the License.
 
    <core xmlns="urn:activemq:core">
 
-      <bindings-directory>${data.dir:../data}/bindings</bindings-directory>
+      <bindings-directory>./data/bindings</bindings-directory>
 
-      <journal-directory>${data.dir:../data}/journal</journal-directory>
+      <journal-directory>./data/journal</journal-directory>
 
-      <large-messages-directory>${data.dir:../data}/largemessages</large-messages-directory>
+      <large-messages-directory>./data/largemessages</large-messages-directory>
 
-      <paging-directory>${data.dir:../data}/paging</paging-directory>
+      <paging-directory>./data/paging</paging-directory>
 
       <!-- Connectors -->
       <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9a986848/examples/features/ha/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/ha/pom.xml b/examples/features/ha/pom.xml
index 4d4904e..e607a1f 100644
--- a/examples/features/ha/pom.xml
+++ b/examples/features/ha/pom.xml
@@ -69,20 +69,14 @@ under the License.
          <modules>
             <module>application-layer-failover</module>
             <module>client-side-failoverlistener</module>
-
-            <!-- ARTEMIS-197 FIX ME:
             <module>colocated-failover</module>
-            <module>colocated-failover-scale-down</module> -->
-
+            <module>colocated-failover-scale-down</module>
             <module>ha-policy-autobackup</module>
             <module>multiple-failover</module>
             <module>multiple-failover-failback</module>
             <module>non-transaction-failover</module>
-
-            <!-- ARTEMIS-197 FIX ME:
             <module>replicated-failback</module>
-            <module>replicated-failback-static</module> -->
-
+            <module>replicated-failback-static</module>
             <module>replicated-multiple-failover</module>
             <module>replicated-transaction-failover</module>
             <module>scale-down</module>


Mime
View raw message