@Override public void start(final StartContext context) throws StartException { SingletonProvider.initialize(new ModuleGroupSingletonProvider()); }
@Override public void stop(final StopContext context) { SingletonProvider.reset(); }
public static SingletonProvider instance() { if (INSTANCE == null) { synchronized (SingletonProvider.class) { if (INSTANCE == null) { initializeWithDefaultScope(); } } } return INSTANCE; }
public static SingletonProvider instance() { if (INSTANCE == null) { synchronized (SingletonProvider.class) { if (INSTANCE == null) { initializeWithDefaultScope(); } } } return INSTANCE; }
/** * Called by the OSGi framework when this bundle is started. Sets the singleton provider. * * @param bc * bundle context of this bundle */ public void activate(BundleContext bc) { this.bundleContext = bc; SingletonProvider.initialize(new RegistrySingletonProvider()); }
/** * Called by the OSGi framework when this bundle is stopped. Resets the singleton provider. */ public void deactivate() { SingletonProvider.reset(); }
public static SingletonProvider instance() { if (INSTANCE == null) { synchronized (SingletonProvider.class) { if (INSTANCE == null) { initializeWithDefaultScope(); } } } return INSTANCE; }
@Override public void start(StartContext context) throws StartException { SingletonProvider.initialize(new ModuleGroupSingletonProvider()); }
/** * Removes the SingletonProvider - we assume that no application is running anymore * in this application server when the deployer is uninstalled (shutdown) */ public void stop() { SingletonProvider.reset(); }
public static SingletonProvider instance() { if (INSTANCE == null) { synchronized (SingletonProvider.class) { if (INSTANCE == null) { initializeWithDefaultScope(); } } } return INSTANCE; }
/** * Configures the SingletonProvider to be used by the application server */ public void start() { if (singletonProvider != null) { SingletonProvider.initialize(singletonProvider); } else { // set up the default Singleton provider, which in this case is JBossSingletonProvider JBossSingletonProvider provider = new JBossSingletonProvider(); provider.setTopLevelClassLoaderGetter(DUTopLevelClassLoaderGetter.INSTANCE); SingletonProvider.initialize(provider); } }
@Override public void stop(StopContext context) { SingletonProvider.reset(); }
public static SingletonProvider instance() { if (INSTANCE == null) { synchronized (SingletonProvider.class) { if (INSTANCE == null) { initializeWithDefaultScope(); } } } return INSTANCE; }
public static void initializeWeldSingletonProvider() { boolean earSupport = false; try { Class.forName("org.glassfish.javaee.full.deployment.EarClassLoader"); earSupport = true; } catch (ClassNotFoundException ignore) { } SingletonProvider.initialize(earSupport ? new ACLSingletonProvider() : new TCCLSingletonProvider()); }
public void stop(BundleContext context) throws Exception { SingletonProvider.reset(); }
public static SingletonProvider instance() { if (INSTANCE == null) { synchronized (SingletonProvider.class) { if (INSTANCE == null) { initializeWithDefaultScope(); } } } return INSTANCE; }
public static SingletonProvider instance() { if (INSTANCE == null) { synchronized (SingletonProvider.class) { if (INSTANCE == null) { /* * TODO: We should discover ScopeFactory implementation using Service Provider Mechanism. In the absence of * any explicitly configured service, should we default to the default implementation. */ initializeWithDefaultScope(); } } } return INSTANCE; }