Package com.betfair.cougar.util.jmx

Examples of com.betfair.cougar.util.jmx.JMXControl


    }

    @Override
    public void afterPropertiesSet() throws Exception {
        try {
            JMXControl control = (JMXControl) applicationContext.getBean("clientJMXControl");
            if (control != null) {
                final String[] instances = addressList.replaceAll(":", "_").split(",");
                for (String instance : instances) {
                    control.registerMBean("CoUGAR.socket.transport.client:name=socketSessionFactory,instance=" + instance, sessionFactory);
                    control.registerMBean("CoUGAR.socket.transport.client:name=socketSessionRecycler,instance=" + instance, sessionFactory.getSessionRecycler());
                }
            }
        } catch (Exception ex) {
            LOG.log(Level.WARNING, "Error while registering socket session mbeans", ex);
        }
View Full Code Here


            super.onApplicationEvent(event);
            try {
                final ApplicationContext ctx = ((ContextRefreshedEvent) event).getApplicationContext();
        // Check that the JMXControl exists before registering all exportables
        // see JMXControl javadocs for why we have to do it this way
        JMXControl jmxControl = JMXControl.getFromContext(ctx);
        if (jmxControl == null) {
          throw new PanicInTheCougar("jmxControl bean not found in ApplicationContext");
        }
        if (exportables != null) {
          for (Exportable exportable : exportables) {
View Full Code Here

    }

    @Override
    public void afterPropertiesSet() throws Exception {
        try {
            JMXControl control = (JMXControl) applicationContext.getBean("clientJMXControl");
            if (control != null) {
                final String[] instances = addressList.replaceAll(":", "_").split(",");
                for (String instance : instances) {
                    control.registerMBean("CoUGAR.socket.transport.client:name=socketSessionFactory,instance=" + instance, sessionFactory);
                    control.registerMBean("CoUGAR.socket.transport.client:name=socketSessionRecycler,instance=" + instance, sessionFactory.getSessionRecycler());
                }
            }
        } catch (Exception ex) {
            LOG.log(Level.WARNING, "Error while registering socket session mbeans", ex);
        }
View Full Code Here

TOP

Related Classes of com.betfair.cougar.util.jmx.JMXControl

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.