use of org.jboss.ws.common.management.ManagedEndpoint in project wildfly by wildfly.
the class EndpointService method registerEndpoint.
private void registerEndpoint(final Endpoint endpoint) {
MBeanServer mbeanServer = serverConfigService.get().getMbeanServer();
if (mbeanServer != null) {
try {
ManagedEndpoint jmxEndpoint = new ManagedEndpoint(endpoint, mbeanServer);
mbeanServer.registerMBean(jmxEndpoint, endpoint.getName());
} catch (final JMException ex) {
WSLogger.ROOT_LOGGER.trace("Cannot register endpoint in JMX server", ex);
WSLogger.ROOT_LOGGER.cannotRegisterEndpoint(endpoint.getShortName());
}
} else {
WSLogger.ROOT_LOGGER.mBeanServerNotAvailable(endpoint.getShortName());
}
}
Aggregations