本文整理了Java中org.jboss.weld.environment.se.Weld.shutdown()
方法的一些代码示例,展示了Weld.shutdown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Weld.shutdown()
方法的具体详情如下:
包路径:org.jboss.weld.environment.se.Weld
类名称:Weld
方法名:shutdown
[英]Shuts down all the containers initialized by this builder.
[中]关闭此生成器初始化的所有容器。
代码示例来源:origin: jersey/jersey
@Override
public void run() {
server.shutdownNow();
weld.shutdown();
}
}));
代码示例来源:origin: jersey/jersey
protected static void stop() {
server.shutdownNow();
weld.shutdown();
}
代码示例来源:origin: 4thline/cling
@Override
public void shutdown() {
upnpServiceShutdownEvent.fire(new UpnpService.Shutdown());
removeLoggingHandler(); // Disable CDI logging handler before stopping CDI container
weld.shutdown();
super.shutdown();
}
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) throws Exception {
Weld weld = new Weld();
final WeldContainer container = weld.initialize();
RequestContext requestContext= container.instance().select(RequestContext.class, UnboundLiteral.INSTANCE).get();
requestContext.activate();
final MyPojo pojo = container.instance().select(MyPojo.class).get();
Thread t = new Thread() {
public void run() {
RequestContext requestContext= container.instance().select(RequestContext.class, UnboundLiteral.INSTANCE).get();
requestContext.activate();
System.out.println("1" + pojo.ping());
}
};
t.start();
t.join();
System.out.println("2" + pojo.ping());
weld.shutdown();
}
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) throws IOException {
Weld weld = new Weld();
WeldContainer container = weld.initialize();
Application application = container.instance().select(Application.class).get();
application.run();
weld.shutdown();
}
代码示例来源:origin: weld/core
/**
* Shut down Weld immediately. Blocks until Weld is completely shut down.
*/
public void shutdownNow() {
weld.shutdown();
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
/**
* Shut down Weld immediately. Blocks until Weld is completely shut down.
*/
public void shutdownNow() {
weld.shutdown();
}
代码示例来源:origin: weld/core
/**
* Shut down Weld immediately. Blocks until Weld is completely shut down.
*/
public void shutdownNow() {
weld.shutdown();
}
代码示例来源:origin: org.uberfire/uberfire-test-utils
private void stopWeld() {
logger.debug("Stopping Weld for test class " + testClass.getCanonicalName());
if (weld != null) {
weld.shutdown();
}
}
}
代码示例来源:origin: kiegroup/appformer
private void stopWeld() {
logger.debug("Stopping Weld for test class " + testClass.getCanonicalName());
if (weld != null) {
weld.shutdown();
}
}
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
protected void stopWeld() {
if (weld != null) {
weld.shutdown();
}
}
}
代码示例来源:origin: NationalSecurityAgency/datawave
@Override
protected void cleanup(Context context) throws IOException, InterruptedException {
super.cleanup(context);
if (weld != null) {
weld.shutdown();
}
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
protected void stopWeld() {
if (weld != null) {
weld.shutdown();
}
}
代码示例来源:origin: stackoverflow.com
Weld weld = new Weld();
try {
WeldContainer container = weld.initialize();
URI baseUri = UriBuilder.fromUri("http://localhost/").port(8080).build();
ResourceConfig config = ResourceConfig.forApplicationClass(MyApplication.class);
Server server = JettyHttpContainerFactory.createServer(baseUri, config);
server.join();
} catch (Exception e) {
e.printStackTrace();
} finally {
weld.shutdown();
}
代码示例来源:origin: FroMage/redpipe
@Override
public Completable shutdown() {
return Completable.defer(() -> {
weld.shutdown();
return super.shutdown();
});
}
代码示例来源:origin: stackoverflow.com
Weld weld = new Weld();
WeldContainer container = weld.initialize();
World helloWorld = container.instance().select(World.class).get();
System.out.println(helloWorld.helloWorld());
weld.shutdown();
代码示例来源:origin: org.kie/kie-config-cli
@Override
public String execute(CliContext context) {
cleanup(context.getParameter("tmp-dir"));
context.getWeld().shutdown();
System.exit(0);
return null;
}
代码示例来源:origin: org.jbpm/jbpm-form-modeler-ui
@After
public void cleanup() {
if (weld != null) {
weld.shutdown();
}
}
代码示例来源:origin: stackoverflow.com
// Initialize Weld
Weld theWeld = new Weld();
WeldContainer theContainer = theWeld.initialize();
// Execute the run method
theContainer.instance().select(Main.class).get().run();
// Shutting down Weld again
theWeld.shutdown();
代码示例来源:origin: agoncal/agoncal-book-javaee7
public static void main(String[] args) {
Weld weld = new Weld();
WeldContainer container = weld.initialize();
BookService bookService = container.instance().select(BookService.class).get();
Book book = bookService.createBook("H2G2", 12.5f, "Geeky scifi Book");
System.out.println(book);
weld.shutdown();
}
}
内容来源于网络,如有侵权,请联系作者删除!