/** * Creates a new Listener that uses the given {@link BeanManager} instead of initializing a new Weld container instance. * * @param manager the bean manager to be used * @return a new Listener instance */ public static Listener using(BeanManager manager) { return new Listener(Collections.singletonList(initAction(WeldServletLifecycle.BEAN_MANAGER_ATTRIBUTE_NAME, manager))); }
/** * Creates a new Listener that uses the given {@link BeanManager} instead of initializing a new Weld container instance. * * @param manager the bean manager to be used * @return a new Listener instance */ public static Listener using(BeanManager manager) { return new Listener(Collections.singletonList(initAction(WeldServletLifecycle.BEAN_MANAGER_ATTRIBUTE_NAME, manager))); }
/** * Creates a new Listener that uses the given {@link ContainerInstance} (e.g. {@link org.jboss.weld.environment.se.WeldContainer}) instead of initializing a * new Weld container instance. The listener does not take over the responsibility for container instance lifecycle management. It is the caller's * responsibility to shut down the container instance properly. The listener will not shut down the container instance when the Servlet context is * destroyed. * * @param container the container instance to be used * @return a new Listener instance */ public static Listener using(ContainerInstance container) { return new Listener(Collections.singletonList(initAction(CONTAINER_ATTRIBUTE_NAME, container))); }
/** * Creates a new Listener that uses the given {@link ContainerInstance} (e.g. {@link org.jboss.weld.environment.se.WeldContainer}) instead of initializing a * new Weld container instance. The listener does not take over the responsibility for container instance lifecycle management. It is the caller's * responsibility to shut down the container instance properly. The listener will not shut down the container instance when the Servlet context is * destroyed. * * @param container the container instance to be used * @return a new Listener instance */ public static Listener using(ContainerInstance container) { return new Listener(Collections.singletonList(initAction(CONTAINER_ATTRIBUTE_NAME, container))); }
/** * Creates a new Listener that uses the given {@link ContainerInstanceFactory} for initializing Weld instance. A new Weld instance will be initialized using * {@link ContainerInstanceFactory#initialize()} when the Servlet context is initialized. The Weld instance will be shut down when Servlet context is * destroyed. * * @param container the container factory to be used * @return a new Listener instance */ public static Listener using(ContainerInstanceFactory container) { return new Listener(Collections.singletonList(initAction(CONTAINER_ATTRIBUTE_NAME, container))); }
/** * Creates a new Listener that uses the given {@link ContainerInstance} (e.g. {@link org.jboss.weld.environment.se.WeldContainer}) instead of initializing a * new Weld container instance. The listener does not take over the responsibility for container instance lifecycle management. It is the caller's * responsibility to shut down the container instance properly. The listener will not shut down the container instance when the Servlet context is * destroyed. * * @param container the container instance to be used * @return a new Listener instance */ public static Listener using(ContainerInstance container) { return new Listener(Collections.singletonList(initAction(CONTAINER_ATTRIBUTE_NAME, container))); }
/** * Creates a new Listener that uses the given {@link ContainerInstanceFactory} for initializing Weld instance. A new Weld instance will be initialized using * {@link ContainerInstanceFactory#initialize()} when the Servlet context is initialized. The Weld instance will be shut down when Servlet context is * destroyed. * * @param container the container factory to be used * @return a new Listener instance */ public static Listener using(ContainerInstanceFactory container) { return new Listener(Collections.singletonList(initAction(CONTAINER_ATTRIBUTE_NAME, container))); }
/** * Creates a new Listener that uses the given {@link BeanManager} instead of initializing a new Weld container instance. * * @param manager the bean manager to be used * @return a new Listener instance */ public static Listener using(BeanManager manager) { return new Listener(Collections.singletonList(initAction(WeldServletLifecycle.BEAN_MANAGER_ATTRIBUTE_NAME, manager))); }
/** * Creates a new Listener that uses the given {@link ContainerInstanceFactory} for initializing Weld instance. A new Weld instance will be initialized using * {@link ContainerInstanceFactory#initialize()} when the Servlet context is initialized. The Weld instance will be shut down when Servlet context is * destroyed. * * @param container the container factory to be used * @return a new Listener instance */ public static Listener using(ContainerInstanceFactory container) { return new Listener(Collections.singletonList(initAction(CONTAINER_ATTRIBUTE_NAME, container))); }