/** * 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))); }
public EmbeddedJettyServer() { super("/jaxrs_cdi", "/", PORT, new Listener()); } }
public EmbeddedJettyServer() { super("/", PORT, new Listener()); } }
/** * 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 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))); }
public EmbeddedJettyServer() { super("/", PORT, new Listener()); } }
/** * 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))); }
public EmbeddedJettyServer() { super("/jaxrs_cdi", "/", PORT, new Listener()); } }
public EmbeddedJettyServer() { super("/jaxrs_cdi", "/", PORT, new Listener()); } }
public EmbeddedJettyServer() { super("/", PORT, new Listener()); } }
public static void main(final String[] args) throws Exception { // use system property first String port = System.getProperty("server.port"); if (port == null) { // and fallback to use environment variable port = System.getenv("FABRIC8_HTTP_PORT"); } if (port == null) { // and use port 8585 by default port = "8585"; } Integer num = Integer.parseInt(port); System.out.println("Starting REST server on port: " + port); final Server server = new Server(num); // Register and map the dispatcher servlet final ServletHolder servletHolder = new ServletHolder(new CXFCdiServlet()); final ServletContextHandler context = new ServletContextHandler(); context.setContextPath("/"); context.addEventListener(new Listener()); context.addEventListener(new BeanManagerResourceBindingListener()); context.addServlet(servletHolder, "/cxfcdi/*"); server.setHandler(context); server.start(); server.join(); }
context.addEventListener(new Listener()); context.addEventListener(new BeanManagerResourceBindingListener()); String servletPath = "/*";
context.setContextPath("/"); context.addEventListener(new BeanManagerResourceBindingListener()); context.addEventListener(new Listener());
apiManServer.setSecurityHandler(createSecurityHandler()); apiManServer.setContextPath("/apiman"); apiManServer.addEventListener(new Listener()); apiManServer.addEventListener(new BeanManagerResourceBindingListener()); apiManServer.addEventListener(new ResteasyBootstrap());
addSecurityHandler(apiManServer); apiManServer.setContextPath("/apiman"); apiManServer.addEventListener(new Listener()); apiManServer.addEventListener(new BeanManagerResourceBindingListener()); apiManServer.addEventListener(new ResteasyBootstrap());