/** * This method will add the ability to use the {@link Immediate} scope to * the given locator. If the locator already has a {@link Context} implementation * that handles the {@link Immediate} scope this method does nothing. * <p> * This implementation of {@link Immediate} scope will use a separate thread for * instantiating services. Any failures from {@link Immediate} scoped services * will be given to the current set of {@link ImmediateErrorHandler} implementations * * @param locator The non-null locator to enable the Immediate scope on * @throws MultiException if there were errors when committing the service */ public static void enableImmediateScope(ServiceLocator locator) { ImmediateController controller = enableImmediateScopeSuspended(locator); controller.setImmediateState(ImmediateServiceState.RUNNING); }
/** * This method will add the ability to use the {@link Immediate} scope to * the given locator. If the locator already has a {@link Context} implementation * that handles the {@link Immediate} scope this method does nothing. * <p> * This implementation of {@link Immediate} scope will use a separate thread for * instantiating services. Any failures from {@link Immediate} scoped services * will be given to the current set of {@link ImmediateErrorHandler} implementations * * @param locator The non-null locator to enable the Immediate scope on * @throws MultiException if there were errors when committing the service */ public static void enableImmediateScope(ServiceLocator locator) { ImmediateController controller = enableImmediateScopeSuspended(locator); controller.setImmediateState(ImmediateServiceState.RUNNING); }
/** * This method will add the ability to use the {@link Immediate} scope to * the given locator. If the locator already has a {@link Context} implementation * that handles the {@link Immediate} scope this method does nothing. * <p> * This implementation of {@link Immediate} scope will use a separate thread for * instantiating services. Any failures from {@link Immediate} scoped services * will be given to the current set of {@link ImmediateErrorHandler} implementations * * @param locator The non-null locator to enable the Immediate scope on * @throws MultiException if there were errors when committing the service */ public static void enableImmediateScope(ServiceLocator locator) { ImmediateController controller = enableImmediateScopeSuspended(locator); controller.setImmediateState(ImmediateServiceState.RUNNING); }
/** * This method will add the ability to use the {@link Immediate} scope to * the given locator. If the locator already has a {@link Context} implementation * that handles the {@link Immediate} scope this method does nothing. * <p> * This implementation of {@link Immediate} scope will use a separate thread for * instantiating services. Any failures from {@link Immediate} scoped services * will be given to the current set of {@link ImmediateErrorHandler} implementations * * @param locator The non-null locator to enable the Immediate scope on * @throws MultiException if there were errors when committing the service */ public static void enableImmediateScope(ServiceLocator locator) { ImmediateController controller = enableImmediateScopeSuspended(locator); controller.setImmediateState(ImmediateServiceState.RUNNING); }
ServiceLocatorUtilities.enableImmediateScopeSuspended(serviceLocator); ServiceLocatorUtilities.enableInheritableThreadScope(serviceLocator); ServiceLocatorUtilities.enableLookupExceptions(serviceLocator);