use of org.exoplatform.container.jmx.support.ManagedComponentRequestLifeCycle in project kernel by exoplatform.
the class TestRootContainerManagedIntegration method testRootManagedRequestLifeCycle.
public void testRootManagedRequestLifeCycle() throws Exception {
RootContainer container = createRootContainer("configuration5.xml");
ManagedComponentRequestLifeCycle component = (ManagedComponentRequestLifeCycle) container.getComponentInstanceOfType(ManagedComponentRequestLifeCycle.class);
assertNotNull(component);
MBeanServer server = container.getMBeanServer();
server.invoke(new ObjectName("exo:object=ManagedComponentRequestLifeCycle"), "foo", new Object[0], new String[0]);
assertEquals(1, component.startCount);
assertEquals(1, component.fooCount);
assertEquals(1, component.endCount);
assertSame(container, component.startContainer);
assertSame(container, component.endContainer);
}
Aggregations