Package org.apache.activemq.broker.jmx

Examples of org.apache.activemq.broker.jmx.ManagementContext


                    }
                }
            }
           
            // Do not allow creation of another ConnectorServer
            ManagementContext mgmtctx = new ManagementContext(mbeanServerReference != null ? mbeanServerReference.getMBeanServer() : null);
            mgmtctx.setCreateConnector(false);
            brokerService.setManagementContext(mgmtctx);

            // Do not allow the broker to use a shutown hook, the kernel will stop it
            brokerService.setUseShutdownHook(isUseShutdownHook());
View Full Code Here


                    }
                }
            }
           
            // Do not allow creation of another ConnectorServer
            ManagementContext mgmtctx = new ManagementContext();
            mgmtctx.setCreateConnector(false);
            brokerService.setManagementContext(mgmtctx);

            // Do not allow the broker to use a shutown hook, the kernel will stop it
            brokerService.setUseShutdownHook(isUseShutdownHook());
View Full Code Here

            }
            brokerService = brokerFactory.getBroker();
//            brokerService = BrokerFactory.createBroker(new URI(brokerUri));
           
            // Do not allow creation of another ConnectorServer
            ManagementContext mgmtctx = new ManagementContext(mbeanServerReference != null ? mbeanServerReference.getMBeanServer() : null);
            mgmtctx.setCreateConnector(false);
            brokerService.setManagementContext(mgmtctx);

            // Do not allow the broker to use a shutdown hook, the kernel will stop it
            brokerService.setUseShutdownHook(useShutdownHook);
        }
View Full Code Here

    public ConnectionDotFileInterceptor(Broker next, String file, boolean redrawOnRemove) throws MalformedObjectNameException {
        super(next, file);
        this.redrawOnRemove = redrawOnRemove;

        mbeanServer = new ManagementContext().getMBeanServer();
        ObjectName brokerName = new ObjectName(domain + ":Type=Broker,BrokerName=localhost");
        brokerView = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerName, BrokerViewMBean.class, true);
    }
View Full Code Here

        this.brokerObjectName = brokerObjectName;
    }

    public ManagementContext getManagementContext() {
        if (managementContext == null) {
            managementContext = new ManagementContext();
        }
        return managementContext;
    }
View Full Code Here

     * Creates and registers a TransportLoggerControl MBean which enables the user
     * to enable/disable logging for all transport loggers at once.
     */
     private void createTransportLoggerControl(int port) {
         try {
             this.managementContext = new ManagementContext();
             this.managementContext.setConnectorPort(port);
             this.managementContext.start();
         } catch (Exception e) {
             LOG.error("Management context could not be started, reason: " + e, e);
         }
View Full Code Here

        this.brokerObjectName = brokerObjectName;
    }

    public ManagementContext getManagementContext() {
        if (managementContext == null) {
            managementContext = new ManagementContext();
        }
        return managementContext;
    }
View Full Code Here

    public ConnectionDotFileInterceptor(Broker next, String file, boolean redrawOnRemove) throws IOException {
        super(next, file);
        this.redrawOnRemove = redrawOnRemove;

        mbeanServer = new ManagementContext().getMBeanServer();
        ObjectName brokerName = next.getBrokerService().getBrokerObjectName();
        brokerView = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, brokerName, BrokerViewMBean.class, true);
    }
View Full Code Here

        this.brokerObjectName = brokerObjectName;
    }

    public ManagementContext getManagementContext() {
        if (managementContext == null) {
            managementContext = new ManagementContext();
        }
        return managementContext;
    }
View Full Code Here

            // String brokerDir = "xbean:...;
            // System.setProperty("activemq.base", brokerDir);
            // BrokerService broker = BrokerFactory.createBroker(new URI(brokerDir + "/activemq.xml"));

            // for running on Java 5 without mx4j
            ManagementContext managementContext = broker.getManagementContext();
            managementContext.setFindTigerMbeanServer(true);
            managementContext.setUseMBeanServer(true);
            managementContext.setCreateConnector(false);

            broker.setUseJmx(true);
            // broker.setPlugins(new BrokerPlugin[] { new
            // ConnectionDotFilePlugin(), new UDPTraceBrokerPlugin() });
            broker.addConnector("tcp://localhost:61616");
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.jmx.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.