Package org.apache.servicemix.jbi.management

Examples of org.apache.servicemix.jbi.management.ManagementContext


    private void createComponentStats(JBIContainer container, ComponentMBeanImpl component) {
        String key = component.getName();
        ComponentStats stats = new ComponentStats(component);
        componentStats.putIfAbsent(key, stats);
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.registerMBean(context.createObjectName(context.createObjectNameProps(stats, true)),
                    stats,
                    ComponentStatsMBean.class);
        } catch (Exception e) {
            LOG.info("Unable to register component statistics MBean: " + e.getMessage());
            if (LOG.isDebugEnabled()) {
View Full Code Here


        ComponentStats stats = componentStats.remove(key);
        if (stats == null) {
            return;
        }
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.unregisterMBean(context.createObjectName(context.createObjectNameProps(stats, true)));
        } catch (Exception e) {
            LOG.info("Unable to unregister component statistics MBean: " + e);
            if (LOG.isDebugEnabled()) {
                LOG.debug("Unable to unregister component statistics MBean", e);
            }
View Full Code Here

        String key = EndpointSupport.getUniqueKey(endpoint);
        ComponentStats compStats = componentStats.get(endpoint.getComponentNameSpace().getName());
        EndpointStats stats = new EndpointStats(endpoint, compStats.getMessagingStats());
        endpointStats.putIfAbsent(key, stats);
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.registerMBean(context.createObjectName(context.createObjectNameProps(stats, true)),
                                  stats,
                                  EndpointStatsMBean.class);
        } catch (Exception e) {
            LOG.info("Unable to register endpoint statistics MBean: " + e.getMessage());
            if (LOG.isDebugEnabled()) {
View Full Code Here

     */
    private void removeEndpointStats(JBIContainer containner, AbstractServiceEndpoint endpoint) {
        String key = EndpointSupport.getUniqueKey(endpoint);
        EndpointStats stats = endpointStats.remove(key);
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.unregisterMBean(context.createObjectName(context.createObjectNameProps(stats, true)));
        } catch (Exception e) {
            LOG.info("Unable to unregister endpoint statistics MBean: " + e.getMessage());
            if (LOG.isDebugEnabled()) {
                LOG.debug("Unable to unregister endpoint statistics MBean", e);
            }
View Full Code Here

     */
    private void removeEndpointStats(JBIContainer containner, AbstractServiceEndpoint endpoint) {
        String key = EndpointSupport.getUniqueKey(endpoint);
        EndpointStats stats = endpointStats.remove(key);
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.unregisterMBean(context.createObjectName(context.createObjectNameProps(stats, true)));
        } catch (Exception e) {
            LOGGER.info("Unable to unregister endpoint statistics MBean: {}", e.getMessage());
            LOGGER.debug("Unable to unregister endpoint statistics MBean", e);
        }
    }
View Full Code Here

    private void createComponentStats(JBIContainer container, ComponentMBeanImpl component) {
        String key = component.getName();
        ComponentStats stats = new ComponentStats(component);
        componentStats.putIfAbsent(key, stats);
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.registerMBean(context.createObjectName(context.createObjectNameProps(stats, true)),
                    stats,
                    ComponentStatsMBean.class);
        } catch (Exception e) {
            LOGGER.info("Unable to register component statistics MBean: {}", e.getMessage());
            LOGGER.debug("Unable to register component statistics MBean", e);
View Full Code Here

        ComponentStats stats = componentStats.remove(key);
        if (stats == null) {
            return;
        }
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.unregisterMBean(context.createObjectName(context.createObjectNameProps(stats, true)));
        } catch (Exception e) {
            LOGGER.info("Unable to unregister component statistics MBean: {}", e);
            LOGGER.debug("Unable to unregister component statistics MBean", e);
        }
    }
View Full Code Here

        String key = EndpointSupport.getUniqueKey(endpoint);
        ComponentStats compStats = componentStats.get(endpoint.getComponentNameSpace().getName());
        EndpointStats stats = new EndpointStats(endpoint, compStats.getMessagingStats());
        endpointStats.putIfAbsent(key, stats);
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.registerMBean(context.createObjectName(context.createObjectNameProps(stats, true)),
                                  stats,
                                  EndpointStatsMBean.class);
        } catch (Exception e) {
            LOGGER.info("Unable to register endpoint statistics MBean: {}", e.getMessage());
            LOGGER.debug("Unable to register endpoint statistics MBean", e);
View Full Code Here

        ComponentMBeanImpl component = event.getComponent();
        String key = component.getName();
        ComponentStats stats = new ComponentStats(component);
        componentStats.putIfAbsent(key, stats);
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.registerMBean(context.createObjectName(context.createObjectNameProps(stats, true)),
                    stats,
                    ComponentStatsMBean.class);
        } catch (Exception e) {
            LOG.info("Unable to register component statistics MBean: " + e.getMessage());
            if (LOG.isDebugEnabled()) {
View Full Code Here

        ComponentStats stats = componentStats.remove(key);
        if (stats == null) {
            return;
        }
        // Register MBean
        ManagementContext context = container.getManagementContext();
        try {
            context.unregisterMBean(context.createObjectName(context.createObjectNameProps(stats, true)));
        } catch (Exception e) {
            LOG.info("Unable to unregister component statistics MBean: " + e);
            if (LOG.isDebugEnabled()) {
                LOG.debug("Unable to unregister component statistics MBean", e);
            }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jbi.management.ManagementContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.