use of org.springframework.jmx.support.MBeanServerFactoryBean in project spring-integration by spring-projects.
the class NotificationListeningMessageProducerTests method setup.
@Before
public void setup() throws Exception {
MBeanServerFactoryBean serverFactoryBean = new MBeanServerFactoryBean();
serverFactoryBean.setLocateExistingServerIfPossible(true);
serverFactoryBean.afterPropertiesSet();
this.server = serverFactoryBean.getObject();
MBeanExporter exporter = new MBeanExporter();
exporter.setAutodetect(false);
exporter.afterPropertiesSet();
this.objectName = ObjectNameManager.getInstance("si:name=numberHolder");
exporter.registerManagedResource(this.numberHolder, this.objectName);
}
use of org.springframework.jmx.support.MBeanServerFactoryBean in project spring-boot by spring-projects.
the class JmxAutoConfiguration method mbeanServer.
@Bean
@ConditionalOnMissingBean
public MBeanServer mbeanServer() {
MBeanServerFactoryBean factory = new MBeanServerFactoryBean();
factory.setLocateExistingServerIfPossible(true);
factory.afterPropertiesSet();
return factory.getObject();
}
use of org.springframework.jmx.support.MBeanServerFactoryBean in project spring-integration by spring-projects.
the class AttributePollingMessageSourceTests method setup.
@Before
public void setup() throws Exception {
MBeanServerFactoryBean factoryBean = new MBeanServerFactoryBean();
factoryBean.setLocateExistingServerIfPossible(true);
factoryBean.afterPropertiesSet();
this.server = factoryBean.getObject();
this.server.registerMBean(this.counter, ObjectNameManager.getInstance("test:name=counter"));
}
use of org.springframework.jmx.support.MBeanServerFactoryBean in project spring-integration by spring-projects.
the class MBeanTreePollingMessageSourceTests method setup.
@Before
public void setup() {
MBeanServerFactoryBean factoryBean = new MBeanServerFactoryBean();
factoryBean.setLocateExistingServerIfPossible(true);
factoryBean.afterPropertiesSet();
this.server = factoryBean.getObject();
}
use of org.springframework.jmx.support.MBeanServerFactoryBean in project spring-integration by spring-projects.
the class OperationInvokingMessageHandlerTests method setup.
@Before
public void setup() throws Exception {
MBeanServerFactoryBean factoryBean = new MBeanServerFactoryBean();
factoryBean.setLocateExistingServerIfPossible(true);
factoryBean.afterPropertiesSet();
this.server = factoryBean.getObject();
this.server.registerMBean(new TestOps(), ObjectNameManager.getInstance(this.objectName));
}
Aggregations