Java 类javax.enterprise.inject.se.SeContainerInitializer 实例源码

项目:reactive-cdi-events    文件:Main.java   
public static void main(String[] args) {
    SeContainer seContainer = SeContainerInitializer.newInstance()
            .disableDiscovery()
            .addExtensions(new ReactorExtension())
            .addBeanClasses(FooBarBean.class, EventReceiver.class)
            .initialize();
    FooBarBean bean = seContainer.select(FooBarBean.class).get();
    bean.fluxTheCapacitor();
}
项目:ee8-sandbox    文件:GreeterTest.java   
@Test
public void bootBasicContainer() {
    SeContainerInitializer initializer = SeContainerInitializer.newInstance();
    try (SeContainer container = initializer.initialize()) {
        assertTrue(container.isRunning());
        Set<Bean<?>> greeters = container.getBeanManager().getBeans("greeter");
        assertTrue(greeters.size() == 1);
    }
}
项目:camel-cdi    文件:Main.java   
@Override
protected void doStart() throws Exception {
    container = SeContainerInitializer.newInstance()
        // Since version 2.3.0.Final and WELD-1915, Weld SE registers a shutdown hook
        // that conflicts with Camel main support. See WELD-2051. The parameter below
        // is available starting Weld 2.3.1.Final to deactivate the registration of
        // the shutdown hook.
        .addProperty("org.jboss.weld.se.shutdownHook", false)
        .initialize();
    super.doStart();
    postProcessContext();
    warnIfNoCamelFound();
}
项目:hammock    文件:OWBBootstrapper.java   
public OWBBootstrapper() {
    seContainerInitializer = SeContainerInitializer.newInstance();
}
项目:hammock    文件:Weld3Bootstrapper.java   
public Weld3Bootstrapper() {
    seContainerInitializer = SeContainerInitializer.newInstance();
    config = ConfigProvider.getConfig();
}
项目:hammock    文件:Weld3Bootstrapper.java   
public SeContainerInitializer getSeContainerInitializer() {
    return seContainerInitializer;
}