Package org.apache.cxf.management

Examples of org.apache.cxf.management.InstrumentationManager


    public void testConstructionWithExtensions() throws BusException {
       
        IMocksControl control;
        BindingFactoryManager bindingFactoryManager;
        WSDLManager wsdlManager;
        InstrumentationManager instrumentationManager;
        PhaseManager phaseManager;
       
        control = EasyMock.createNiceControl();
       
        Map<Class, Object> extensions = new HashMap<Class, Object>();
View Full Code Here


       
        Configurer configurer = new ConfigurerImpl();
        bus.getExtension(Configurer.class);
        EasyMock.expectLastCall().andReturn(configurer).anyTimes();
       
        InstrumentationManager iManager = control.createMock(InstrumentationManager.class);
        iManager.getMBeanServer();
        EasyMock.expectLastCall().andReturn(ManagementFactory.getPlatformMBeanServer()).anyTimes();
       
        bus.getExtension(InstrumentationManager.class);
        EasyMock.expectLastCall().andReturn(iManager).anyTimes();
       
View Full Code Here

   
    @PostConstruct
    public void register() {
        if (manager != null) {
            manager.addNamedWorkQueue(name, this);
            InstrumentationManager imanager = manager.getBus().getExtension(InstrumentationManager.class);
            if (null != imanager) {
                try {
                    imanager.register(new WorkQueueImplMBeanWrapper(this));
                } catch (JMException jmex) {
                    LOG.log(Level.WARNING , jmex.getMessage(), jmex);
                }
            }
        }
View Full Code Here

    }
   
    public Counter createCounter(ObjectName on, MessageHandlingTimeRecorder mhtr) {
        Counter counter = null;
        counter = new ResponseTimeCounter(on);
        InstrumentationManager im = bus.getExtension(InstrumentationManager.class);
        if (null != im) {
            try {
                im.register(counter);
            } catch (JMException e) {
                LOG.log(Level.WARNING, "INSTRUMENTATION_REGISTER_FAULT_MSG",
                        new Object[]{on, e});
            }
        }   
View Full Code Here

            }
        }
           
        destination = destinationFactory.getDestination(ei);
        serverRegistry = bus.getExtension(ServerRegistry.class);
        InstrumentationManager manager = bus.getExtension(InstrumentationManager.class);
        if (manager != null) {           
            ManagedEndpoint mep = new ManagedEndpoint(bus, endpoint, this);
            mgr = bus.getExtension(ServerLifeCycleManager.class);
            if (mgr != null) {
                mgr.registerListener(mep);
            }           
            try {
                manager.register(mep);
            } catch (JMException jmex) {
                LOG.log(Level.WARNING, "Registering ManagedEndpoint failed.", jmex);
            }
        }
    }
View Full Code Here

        // ensure cxf classes are loaded from container to avoid conflicts with app
        bus.setExtension(new CxfContainerClassLoader(), ClassLoader.class);

        // activate jmx, by default isEnabled() == false in InstrumentationManagerImpl
        if ("true".equalsIgnoreCase(SystemInstance.get().getProperty("openejb.cxf.jmx", "true"))) {
            final InstrumentationManager mgr = bus.getExtension(InstrumentationManager.class);
            if (InstrumentationManagerImpl.class.isInstance(mgr)) {
                bus.setExtension(LocalMBeanServer.get(), MBeanServer.class); // just to keep everything consistent

                final InstrumentationManagerImpl manager = InstrumentationManagerImpl.class.cast(mgr);
                manager.setEnabled(true);
View Full Code Here

    public void testCountersWithInstrumentationManager() throws Exception {
        // create Client with other bus
        Bus bus = BusFactory.getDefaultBus();
                               
        CounterRepository cr = bus.getExtension(CounterRepository.class);
        InstrumentationManager im = bus.getExtension(InstrumentationManager.class);
        assertNotNull(im);
        InstrumentationManagerImpl impl = (InstrumentationManagerImpl)im;
        assertTrue(impl.isEnabled());
        assertNotNull(impl.getMBeanServer());
       
        MBeanServer mbs = im.getMBeanServer();
        ObjectName name = new ObjectName(ManagementConstants.DEFAULT_DOMAIN_NAME
                                         + ":" + ManagementConstants.BUS_ID_PROP
                                         + "=cxf" + bus.hashCode() + ",*");       
       
        SOAPService service = new SOAPService();
View Full Code Here

    public void testConstructionWithExtensions() throws BusException {
       
        IMocksControl control;
        BindingFactoryManager bindingFactoryManager;
        WSDLManager wsdlManager;
        InstrumentationManager instrumentationManager;
        PhaseManager phaseManager;
       
        control = EasyMock.createNiceControl();
       
        Map<Class<?>, Object> extensions = new HashMap<Class<?>, Object>();
View Full Code Here

    public void testConstructionWithExtensions() throws BusException {
       
        IMocksControl control;
        BindingFactoryManager bindingFactoryManager;
        WSDLManager wsdlManager;
        InstrumentationManager instrumentationManager;
        PhaseManager phaseManager;
       
        control = EasyMock.createNiceControl();
       
        Map<Class<?>, Object> extensions = new HashMap<Class<?>, Object>();
View Full Code Here

       
        IMocksControl control;
        BindingFactoryManager bindingFactoryManager;
        WSDLManager wsdlManager;
        EventProcessor eventProcessor;
        InstrumentationManager instrumentationManager;
        PhaseManager phaseManager;
       
        control = EasyMock.createNiceControl();
       
        Map<Class, Object> extensions = new HashMap<Class, Object>();
View Full Code Here

TOP

Related Classes of org.apache.cxf.management.InstrumentationManager

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.