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(); }
@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); } }
@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(); }
public OWBBootstrapper() { seContainerInitializer = SeContainerInitializer.newInstance(); }
public Weld3Bootstrapper() { seContainerInitializer = SeContainerInitializer.newInstance(); config = ConfigProvider.getConfig(); }
public SeContainerInitializer getSeContainerInitializer() { return seContainerInitializer; }