use host argument properly with CLI create command

This commit is contained in:
Andy Taylor 2015-05-05 11:08:52 +01:00 committed by Clebert Suconic
parent 5e4c3e3bae
commit 56e4bd79bc
2 changed files with 6 additions and 6 deletions

View File

@ -94,7 +94,7 @@ public class Create implements Action
context.out.println(String.format("Creating ActiveMQ Artemis instance at: %s", directory.getCanonicalPath())); context.out.println(String.format("Creating ActiveMQ Artemis instance at: %s", directory.getCanonicalPath()));
if (host == null) if (host == null)
{ {
host = directory.getName(); host = "localhost";
} }
HashMap<String, String> filters = new HashMap<String, String>(); HashMap<String, String> filters = new HashMap<String, String>();

View File

@ -38,21 +38,21 @@ under the License.
<connectors> <connectors>
<!-- Default Connector. Returned to clients during broadcast and distributed around cluster. See broadcast and discovery-groups --> <!-- Default Connector. Returned to clients during broadcast and distributed around cluster. See broadcast and discovery-groups -->
<connector name="activemq">tcp://${activemq.remoting.default.host:localhost}:${activemq.remoting.default.port:61616}</connector> <connector name="activemq">tcp://${activemq.remoting.default.host:${host}}:${activemq.remoting.default.port:61616}</connector>
</connectors> </connectors>
<acceptors> <acceptors>
<!-- Default ActiveMQ Acceptor. Multi-protocol adapter. Currently supports Core, OpenWire, Stomp and AMQP. --> <!-- Default ActiveMQ Acceptor. Multi-protocol adapter. Currently supports Core, OpenWire, Stomp and AMQP. -->
<acceptor name="activemq">tcp://${activemq.remoting.default.host:localhost}:${activemq.remoting.default.port:61616}</acceptor> <acceptor name="activemq">tcp://${activemq.remoting.default.host:${host}}:${activemq.remoting.default.port:61616}</acceptor>
<!-- AMQP Acceptor. Listens on default AMQP port for AMQP traffic.--> <!-- AMQP Acceptor. Listens on default AMQP port for AMQP traffic.-->
<acceptor name="amqp">tcp://${activemq.remoting.amqp.host:localhost}:${activemq.remoting.amqp.port:5672}?protocols=AMQP</acceptor> <acceptor name="amqp">tcp://${activemq.remoting.amqp.host:${host}}:${activemq.remoting.amqp.port:5672}?protocols=AMQP</acceptor>
<!-- STOMP Acceptor. --> <!-- STOMP Acceptor. -->
<acceptor name="stomp">tcp://${activemq.remoting.stomp.host:localhost}:${activemq.remoting.stomp.port:61613}?protocols=STOMP</acceptor> <acceptor name="stomp">tcp://${activemq.remoting.stomp.host:${host}}:${activemq.remoting.stomp.port:61613}?protocols=STOMP</acceptor>
<!-- HornetQ Compatibility Acceptor. Enables ActiveMQ Core and STOMP for legacy HornetQ clients. --> <!-- HornetQ Compatibility Acceptor. Enables ActiveMQ Core and STOMP for legacy HornetQ clients. -->
<acceptor name="hornetq">tcp://${activemq.remoting.hornetq.host:localhost}:${activemq.remoting.hornetq.port:5445}?protocols=CORE,STOMP</acceptor> <acceptor name="hornetq">tcp://${activemq.remoting.hornetq.host:${host}}:${activemq.remoting.hornetq.port:5445}?protocols=CORE,STOMP</acceptor>
</acceptors> </acceptors>
${cluster.settings}${replicated.settings}${shared-store.settings} ${cluster.settings}${replicated.settings}${shared-store.settings}