Example usage for org.springframework.jmx.support MBeanServerFactoryBean setLocateExistingServerIfPossible

List of usage examples for org.springframework.jmx.support MBeanServerFactoryBean setLocateExistingServerIfPossible

Introduction

In this page you can find the example usage for org.springframework.jmx.support MBeanServerFactoryBean setLocateExistingServerIfPossible.

Prototype

public void setLocateExistingServerIfPossible(boolean locateExistingServerIfPossible) 

Source Link

Document

Set whether or not the MBeanServerFactoryBean should attempt to locate a running MBeanServer before creating one.

Usage

From source file:com.apress.prospringintegration.errorhandling.ErrorHandlingConfiguration.java

@Bean
public MBeanServerFactoryBean mbeanServer() {
    MBeanServerFactoryBean factoryBean = new MBeanServerFactoryBean();
    factoryBean.setLocateExistingServerIfPossible(true);
    return factoryBean;
}

From source file:org.cloudfoundry.identity.statsd.MBeanMapTests.java

@Before
public void start() throws Exception {
    MBeanServerFactoryBean factory = new MBeanServerFactoryBean();
    factory.setLocateExistingServerIfPossible(true);
    factory.afterPropertiesSet();//  w  w w .j a va 2  s.  c  om
    server = factory.getObject();
}

From source file:org.jbr.commons.container.java.JavaSpringContainerConfig.java

@Bean
public MBeanServer mBeanServer() {
    final MBeanServerFactoryBean msfb = new MBeanServerFactoryBean();
    msfb.setLocateExistingServerIfPossible(true);
    return msfb.getObject();
}

From source file:org.cloudfoundry.identity.uaa.varz.VarzEndpointTests.java

@Before
public void start() throws Exception {
    MBeanServerFactoryBean factory = new MBeanServerFactoryBean();
    factory.setLocateExistingServerIfPossible(true);
    factory.afterPropertiesSet();/*from w w w  . j  a  v a  2s  .c o  m*/
    server = factory.getObject();
    endpoint = new VarzEndpoint();
    endpoint.setServer(server);
    request = new MockHttpServletRequest();
    request.setServerPort(80);
    request.setServerName("uaa.vcap.me");
    request.setScheme("http");
}

From source file:org.shaigor.rest.retro.security.gateway.config.JMXConfiguration.java

@Bean
public MBeanServerFactoryBean mbeanServer() {
    MBeanServerFactoryBean server = new MBeanServerFactoryBean();
    server.setDefaultDomain(JMXConfiguration.class.getPackage().getName());
    server.setLocateExistingServerIfPossible(true);
    return server;
}

From source file:io.kahu.hawaii.config.KahuConfig.java

@Bean
public MBeanServerFactoryBean mbeanServer() {
    MBeanServerFactoryBean mbeanServer = new MBeanServerFactoryBean();
    mbeanServer.setLocateExistingServerIfPossible(true);
    return mbeanServer;
}