Search in sources :

Example 1 with ManagedEndpoint

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());
    }
}
Also used : JMException(javax.management.JMException) ManagedEndpoint(org.jboss.ws.common.management.ManagedEndpoint) MBeanServer(javax.management.MBeanServer)

Aggregations

JMException (javax.management.JMException)1 MBeanServer (javax.management.MBeanServer)1 ManagedEndpoint (org.jboss.ws.common.management.ManagedEndpoint)1