This closes #532

This commit is contained in:
Clebert Suconic 2016-05-23 18:26:21 -04:00
commit cd088888b6
6 changed files with 15 additions and 9 deletions

View File

@ -99,6 +99,9 @@ public class Create extends InputAbstract {
@Option(name = "--default-port", description = "The port number to use for the main 'artemis' acceptor (Default: 61616)")
int defaultPort = DEFAULT_PORT;
@Option(name = "--http-port", description = "The port number to use for embedded web server (Default: 8161)")
int httpPort = HTTP_PORT;
@Option(name = "--name", description = "The name of the broker (Default: same as host)")
String name;
@ -524,7 +527,7 @@ public class Create extends InputAbstract {
filters.put("${stomp.port}", String.valueOf(STOMP_PORT + portOffset));
filters.put("${hq.port}", String.valueOf(HQ_PORT + portOffset));
filters.put("${mqtt.port}", String.valueOf(MQTT_PORT + portOffset));
filters.put("${http.port}", String.valueOf(HTTP_PORT + portOffset));
filters.put("${http.port}", String.valueOf(httpPort + portOffset));
filters.put("${data.dir}", data);
filters.put("${max-hops}", String.valueOf(maxHops));

View File

@ -29,7 +29,7 @@ JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -X
# There might be options that you only want to enable on specifc commands, like setting a JMX port
# See https://issues.apache.org/jira/browse/ARTEMIS-318
#if [ "$1" = "run" ]; then
# JAVA_ARGS="$JAVA_ARGS -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
# JAVA_ARGS="$JAVA_ARGS -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=1099 -Djava.rmi.activation.port=1098 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
#fi
# Debug args: Uncomment to enable debug

View File

@ -16,6 +16,7 @@
*/
package org.apache.activemq.artemis.api.core.management;
import javax.management.MBeanOperationInfo;
import java.util.Map;
/**
@ -46,5 +47,6 @@ public interface AcceptorControl extends ActiveMQComponentControl {
* Re-create the acceptor with the existing configuration values. Useful, for example, for reloading key/trust
* stores on acceptors which support SSL.
*/
@Operation(desc = "Re-create the acceptor with the existing configuration values. Useful, for example, for reloading key/trust stores on acceptors which support SSL.", impact = MBeanOperationInfo.ACTION)
void reload();
}

View File

@ -30,10 +30,12 @@ public interface ActiveMQComponentControl {
/**
* Starts this component.
*/
@Operation(desc = "starts this component")
void start() throws Exception;
/**
* Stops this component.
*/
@Operation(desc = "stops this component")
void stop() throws Exception;
}

View File

@ -21,7 +21,6 @@ import javax.management.MBeanRegistrationException;
import javax.management.MBeanServer;
import javax.management.NotificationBroadcasterSupport;
import javax.management.ObjectName;
import javax.management.StandardMBean;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
@ -262,7 +261,7 @@ public class ManagementServiceImpl implements ManagementService {
public synchronized void registerDivert(final Divert divert, final DivertConfiguration config) throws Exception {
ObjectName objectName = objectNameBuilder.getDivertObjectName(divert.getUniqueName().toString());
DivertControl divertControl = new DivertControlImpl(divert, storageManager, config);
registerInJMX(objectName, new StandardMBean(divertControl, DivertControl.class));
registerInJMX(objectName, divertControl);
registerInRegistry(ResourceNames.CORE_DIVERT + config.getName(), divertControl);
if (logger.isDebugEnabled()) {
@ -282,7 +281,7 @@ public class ManagementServiceImpl implements ManagementService {
final TransportConfiguration configuration) throws Exception {
ObjectName objectName = objectNameBuilder.getAcceptorObjectName(configuration.getName());
AcceptorControl control = new AcceptorControlImpl(acceptor, storageManager, configuration);
registerInJMX(objectName, new StandardMBean(control, AcceptorControl.class));
registerInJMX(objectName, control);
registerInRegistry(ResourceNames.CORE_ACCEPTOR + configuration.getName(), control);
}
@ -320,7 +319,7 @@ public class ManagementServiceImpl implements ManagementService {
broadcastGroup.setNotificationService(this);
ObjectName objectName = objectNameBuilder.getBroadcastGroupObjectName(configuration.getName());
BroadcastGroupControl control = new BroadcastGroupControlImpl(broadcastGroup, storageManager, configuration);
registerInJMX(objectName, new StandardMBean(control, BroadcastGroupControl.class));
registerInJMX(objectName, control);
registerInRegistry(ResourceNames.CORE_BROADCAST_GROUP + configuration.getName(), control);
}
@ -337,7 +336,7 @@ public class ManagementServiceImpl implements ManagementService {
bridge.setNotificationService(this);
ObjectName objectName = objectNameBuilder.getBridgeObjectName(configuration.getName());
BridgeControl control = new BridgeControlImpl(bridge, storageManager, configuration);
registerInJMX(objectName, new StandardMBean(control, BridgeControl.class));
registerInJMX(objectName, control);
registerInRegistry(ResourceNames.CORE_BRIDGE + configuration.getName(), control);
}
@ -353,7 +352,7 @@ public class ManagementServiceImpl implements ManagementService {
final ClusterConnectionConfiguration configuration) throws Exception {
ObjectName objectName = objectNameBuilder.getClusterConnectionObjectName(configuration.getName());
ClusterConnectionControl control = new ClusterConnectionControlImpl(cluster, storageManager, configuration);
registerInJMX(objectName, new StandardMBean(control, ClusterConnectionControl.class));
registerInJMX(objectName, control);
registerInRegistry(ResourceNames.CORE_CLUSTER_CONNECTION + configuration.getName(), control);
}

View File

@ -520,7 +520,7 @@
<groupId>org.jolokia</groupId>
<artifactId>jolokia-war</artifactId>
<type>war</type>
<version>1.3.2</version>
<version>1.3.3</version>
<!-- License: Apache 2.0 -->
</dependency>
<!-- ## End Jetty Wed Dependencies ## -->