Search in sources :

Example 1 with DiscoveryRegistry

use of org.apache.openejb.server.DiscoveryRegistry in project tomee by apache.

the class ServiceManagerExtender method init.

@Override
public void init() throws Exception {
    if (started != null && started.equals(Boolean.TRUE)) {
        throw new IllegalStateException("ServiceManager is already initialized");
    }
    final DiscoveryRegistry registry = new DiscoveryRegistry();
    SystemInstance.get().setComponent(DiscoveryRegistry.class, registry);
    started = Boolean.FALSE;
    stopped = false;
    final ServerServiceTracker t = new ServerServiceTracker();
    tracker = new BundleTracker(bundleContext, Bundle.ACTIVE | Bundle.STOPPING, t);
    tracker.open();
}
Also used : DiscoveryRegistry(org.apache.openejb.server.DiscoveryRegistry) BundleTracker(org.osgi.util.tracker.BundleTracker)

Aggregations

DiscoveryRegistry (org.apache.openejb.server.DiscoveryRegistry)1 BundleTracker (org.osgi.util.tracker.BundleTracker)1