You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2017/03/29 20:00:41 UTC

[1/3] activemq-artemis git commit: This closes #1156

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 30ec72bfc -> 0e17666de


This closes #1156


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

Branch: refs/heads/master
Commit: 0e17666dedb74ae15e41a670a90ec3fbf46faa3f
Parents: 30ec72b 0f468fe
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Mar 29 16:00:26 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Mar 29 16:00:26 2017 -0400

----------------------------------------------------------------------
 .../activemq/artemis/cli/commands/Create.java   | 44 ++++++++------------
 .../ActiveMQServerControlUsingCoreTest.java     | 24 ++++-------
 2 files changed, 25 insertions(+), 43 deletions(-)
----------------------------------------------------------------------



[2/3] activemq-artemis git commit: ARTEMIS-1079 don't ask for role, address-full-policy, or global-max-size on CLI

Posted by cl...@apache.org.
ARTEMIS-1079 don't ask for role, address-full-policy, or global-max-size on CLI


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

Branch: refs/heads/master
Commit: 0f468fe07c7a44d9c686cdb97ceff6eed2c36451
Parents: 6ddcda5
Author: Justin Bertram <jb...@apache.org>
Authored: Wed Mar 29 11:10:07 2017 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Mar 29 16:00:26 2017 -0400

----------------------------------------------------------------------
 .../activemq/artemis/cli/commands/Create.java   | 44 ++++++++------------
 1 file changed, 17 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0f468fe0/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
index 5407d99..49e5545 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
@@ -188,11 +188,11 @@ public class Create extends InputAbstract {
    @Option(name = "--require-login", description = "This will configure security to require user / password, opposite of --allow-anonymous")
    Boolean requireLogin = null;
 
-   @Option(name = "--paging", description = "Page messages to disk when address becomes full, opposite of --blocking (Default: input)")
-   Boolean paging = null;
+   @Option(name = "--paging", description = "Page messages to disk when address becomes full, opposite of --blocking (Default: true)")
+   Boolean paging;
 
-   @Option(name = "--blocking", description = "Block producers when address becomes full, opposite of --paging (Default: input)")
-   Boolean blocking = null;
+   @Option(name = "--blocking", description = "Block producers when address becomes full, opposite of --paging (Default: false)")
+   Boolean blocking;
 
    @Option(name = "--no-autotune", description = "Disable auto tuning on the journal.")
    boolean noAutoTune;
@@ -209,10 +209,10 @@ public class Create extends InputAbstract {
    @Option(name = "--password", description = "The user's password (Default: input)")
    String password;
 
-   @Option(name = "--role", description = "The name for the role created (Default: input)")
-   String role;
+   @Option(name = "--role", description = "The name for the role created (Default: amq)")
+   String role = "amq";
 
-   @Option(name = "--no-web", description = "This will remove the web server definition from bootstrap.xml")
+   @Option(name = "--no-web", description = "remove the web-server definition from bootstrap.xml")
    boolean noWeb;
 
    @Option(name = "--queues", description = "comma separated list of queues.")
@@ -251,8 +251,8 @@ public class Create extends InputAbstract {
    @Option(name = "--no-fsync", description = "Disable usage of fdatasync (channel.force(false) from java nio) on the journal")
    boolean noJournalSync;
 
-   @Option(name = "--global-max-size", description = "Maximum amount of memory which message data may consume (Default: input)")
-   String globalMaxSize;
+   @Option(name = "--global-max-size", description = "Maximum amount of memory which message data may consume (Default: 100Mb)")
+   String globalMaxSize = "100Mb";
 
    boolean IS_WINDOWS;
 
@@ -467,9 +467,6 @@ public class Create extends InputAbstract {
    }
 
    public boolean isPaging() {
-      if (paging == null) {
-         paging = inputBoolean("--paging | --blocking", "Page messages to disk when an address becomes full?", true);
-      }
       return paging;
    }
 
@@ -515,9 +512,6 @@ public class Create extends InputAbstract {
    }
 
    public String getRole() {
-      if (role == null) {
-         role = input("--role", "Please provide the default role:", "amq");
-      }
       return role;
    }
 
@@ -526,9 +520,6 @@ public class Create extends InputAbstract {
    }
 
    public String getGlobalMaxSize() {
-      if (globalMaxSize == null) {
-         globalMaxSize = input("--global-max-size", "Maximum amount of memory which message data may consume (typically 50% of your JVM's maximum heap size, e.g. 100Mb):", "100Mb");
-      }
       return globalMaxSize;
    }
    public void setGlobalMaxSize(String globalMaxSize) {
@@ -607,11 +598,6 @@ public class Create extends InputAbstract {
          allowAnonymous = Boolean.FALSE;
       }
 
-      // blocking should set paging=false, to avoid user's questions
-      if (blocking != null && blocking.booleanValue()) {
-         paging = Boolean.FALSE;
-      }
-
       context.out.println(String.format("Creating ActiveMQ Artemis instance at: %s", directory.getCanonicalPath()));
 
       HashMap<String, String> filters = new HashMap<>();
@@ -674,8 +660,8 @@ public class Create extends InputAbstract {
       filters.put("${message-load-balancing}", messageLoadBalancing.toString());
       filters.put("${user}", getUser());
       filters.put("${password}", getPassword());
-      filters.put("${role}", getRole());
-      filters.put("${global-max-size}", getGlobalMaxSize());
+      filters.put("${role}", role);
+      filters.put("${global-max-size}", globalMaxSize);
 
       if (clustered) {
          filters.put("${host}", getHostForClustered());
@@ -786,10 +772,14 @@ public class Create extends InputAbstract {
          filters.put("${hornetq-acceptor}", applyFilters(readTextFile(ETC_HORNETQ_ACCEPTOR_TXT), filters));
       }
 
-      if (isPaging()) {
+      if (paging == null && blocking == null) {
          filters.put("${full-policy}", "PAGE");
-      } else {
+      } else if (paging != null && paging) {
+         filters.put("${full-policy}", "PAGE");
+      } else if (blocking != null && blocking) {
          filters.put("${full-policy}", "BLOCK");
+      } else {
+         filters.put("${full-policy}", "PAGE");
       }
 
 


[3/3] activemq-artemis git commit: NO-JIRA server control test update

Posted by cl...@apache.org.
NO-JIRA server control test update


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

Branch: refs/heads/master
Commit: 6ddcda55dbf61d73f2b43f0004b0c6de5101f97c
Parents: 30ec72b
Author: Justin Bertram <jb...@apache.org>
Authored: Wed Mar 29 10:03:42 2017 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Mar 29 16:00:26 2017 -0400

----------------------------------------------------------------------
 .../ActiveMQServerControlUsingCoreTest.java     | 24 +++++++-------------
 1 file changed, 8 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/6ddcda55/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 75e72fd..ad2d813 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
@@ -32,14 +32,6 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
 
    // Static --------------------------------------------------------
 
-   private static String[] toStringArray(final Object[] res) {
-      String[] names = new String[res.length];
-      for (int i = 0; i < res.length; i++) {
-         names[i] = res[i].toString();
-      }
-      return names;
-   }
-
    // Constructors --------------------------------------------------
 
    // Public --------------------------------------------------------
@@ -252,12 +244,12 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
 
          @Override
          public String[] getAddressNames() {
-            return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("addressNames"));
+            return (String[]) proxy.retrieveAttributeValue("addressNames", String.class);
          }
 
          @Override
          public String[] getQueueNames() {
-            return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("queueNames", String.class));
+            return (String[]) proxy.retrieveAttributeValue("queueNames", String.class);
          }
 
          @Override
@@ -292,17 +284,17 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
          }
 
          public String[] getInterceptorClassNames() {
-            return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames"));
+            return (String[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames", String.class);
          }
 
          @Override
          public String[] getIncomingInterceptorClassNames() {
-            return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames"));
+            return (String[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames", String.class);
          }
 
          @Override
          public String[] getOutgoingInterceptorClassNames() {
-            return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("outgoingInterceptorClassNames"));
+            return (String[]) proxy.retrieveAttributeValue("outgoingInterceptorClassNames", String.class);
          }
 
          @Override
@@ -769,7 +761,7 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
 
          @Override
          public String[] getBridgeNames() {
-            return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("bridgeNames"));
+            return (String[]) proxy.retrieveAttributeValue("bridgeNames", String.class);
          }
 
          @Override
@@ -790,7 +782,7 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
 
          @Override
          public String[] getConnectorServices() {
-            return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("connectorServices"));
+            return (String[]) proxy.retrieveAttributeValue("connectorServices", String.class);
          }
 
          @Override
@@ -809,7 +801,7 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
 
          @Override
          public String[] getDivertNames() {
-            return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("divertNames"));
+            return (String[]) proxy.retrieveAttributeValue("divertNames", String.class);
          }
 
          @Override