Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.ManagedEndpoint


    private static final Logger LOG = LogUtils.getL7dLogger(ManagedApiFeature.class);
   
    @Override
    public void initialize(Server server, Bus bus) {
        ManagedApi mApi = new ManagedApi(bus, server.getEndpoint(), server);
        ManagedEndpoint mEndpoint = new ManagedEndpoint(bus, server.getEndpoint(), server);
        InstrumentationManager iMgr = bus.getExtension(InstrumentationManager.class);
        if (iMgr == null) {
            iMgr = new InstrumentationManagerImpl(bus);
        }
        ((InstrumentationManagerImpl)iMgr).setUsePlatformMBeanServer(true);
        ((InstrumentationManagerImpl)iMgr).setCreateMBServerConnectorFactory(false);
        ((InstrumentationManagerImpl)iMgr).setEnabled(true);
        ((InstrumentationManagerImpl)iMgr).init();
        if (iMgr != null) {  
            try {
                iMgr.register(mApi);
                iMgr.register(mEndpoint);
                ServerLifeCycleManager slcMgr = bus.getExtension(ServerLifeCycleManager.class);
                if (slcMgr != null) {
                    slcMgr.registerListener(mApi);
                    slcMgr.registerListener(mEndpoint);
                    mApi.startServer(server);
                    mEndpoint.startServer(server);
                }
                   
            } catch (JMException jmex) {
                jmex.printStackTrace();
                LOG.log(Level.WARNING, "Registering ManagedApi failed.", jmex);
View Full Code Here


        servers.addAll(serverRegistry.getServers());
       
        for (Iterator<Server> iter = servers.iterator(); iter.hasNext();) {
            Server server = (Server) iter.next();
            ManagedApi mApi = new ManagedApi(bus, server.getEndpoint(), server);
            ManagedEndpoint mEndpoint = new ManagedEndpoint(bus, server.getEndpoint(), server);
            InstrumentationManager iMgr = bus.getExtension(InstrumentationManager.class);
            if (iMgr == null) {
                iMgr = new InstrumentationManagerImpl(bus);
            }
            ((InstrumentationManagerImpl)iMgr).setUsePlatformMBeanServer(true);
View Full Code Here

TOP

Related Classes of org.apache.cxf.endpoint.ManagedEndpoint

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.