MBeanServerConnection mbeanServer = getMBeanServerConnection();
<BUG>ManagedServiceContainer proxy = MBeanProxy.get(mbeanServer, objectName, ManagedServiceContainer.class);
</BUG>
ServiceName serviceName = ServiceName.JBOSS.append("osgi", "context");
<BUG>if (State.valueOf(proxy.getState(serviceName.getCanonicalName())) != State.UP) {

proxy.setMode(serviceName.getCanonicalName(), Mode.ACTIVE.toString());
</BUG>
waitForServiceState(serviceName, State.UP, 5000);
}

MBeanServerConnection mbeanServer = getMBeanServerConnection();
ServiceContainerMXBean proxy = MBeanProxy.get(mbeanServer, objectName, ServiceContainerMXBean.class);
ServiceName serviceName = ServiceName.JBOSS.append("osgi", "context");
if (State.valueOf(proxy.getServiceStatus(serviceName.getCanonicalName()).getStateName()) != State.UP) {
proxy.setServiceMode(serviceName.getCanonicalName(), Mode.ACTIVE.toString());
waitForServiceState(serviceName, State.UP, 5000);
