本文整理了Java中org.jboss.weld.environment.se.Weld.disableDiscovery()
方法的一些代码示例,展示了Weld.disableDiscovery()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Weld.disableDiscovery()
方法的具体详情如下:
包路径:org.jboss.weld.environment.se.Weld
类名称:Weld
方法名:disableDiscovery
[英]By default, the discovery is enabled. However, it's possible to disable the discovery completely so that only the "synthetic" bean archive is considered.
[中]默认情况下,发现处于启用状态。但是,可以完全禁用发现,以便只考虑“合成”bean归档。
代码示例来源:origin: org.jboss.weld/weld-junit-common
/**
* The returned {@link Weld} instance has:
* <ul>
* <li>automatic discovery disabled</li>
* <li>concurrent deployment disabled</li>
* </ul>
*
* @return a new {@link Weld} instance suitable for testing
*/
public static Weld createWeld() {
return new Weld().disableDiscovery().property(ConfigurationKey.CONCURRENT_DEPLOYMENT.get(), false);
}
代码示例来源:origin: weld/weld-junit
/**
* The returned {@link Weld} instance has:
* <ul>
* <li>automatic discovery disabled</li>
* <li>concurrent deployment disabled</li>
* </ul>
*
* @return a new {@link Weld} instance suitable for testing
*/
public static Weld createWeld() {
return new Weld().disableDiscovery().property(ConfigurationKey.CONCURRENT_DEPLOYMENT.get(), false);
}
代码示例来源:origin: jbosstm/narayana
.disableDiscovery()
.addExtensions(LraAnnotationProcessingExtension.class)
.setClassLoader(classLoader)
代码示例来源:origin: org.drools/drools-cdi
weld.disableDiscovery();
return weld;
代码示例来源:origin: weld/weld-vertx
@Before
public void init(TestContext context) {
vertx = Vertx.vertx();
WeldVerticle weldVerticle = new WeldVerticle(createDefaultWeld().disableDiscovery().beanClasses(CoolHelloService.class));
Async async = context.async();
vertx.deployVerticle(weldVerticle, r -> {
if (r.succeeded()) {
weld = weldVerticle.container();
async.complete();
} else {
context.fail(r.cause());
}
});
}
代码示例来源:origin: weld/weld-vertx
@Test
public void testConsumers() throws InterruptedException {
try (WeldContainer weld = new Weld().disableDiscovery().addExtension(new VertxExtension()).addPackage(false, RegisterConsumersAfterBootstrapTest.class)
.initialize()) {
Vertx vertx = Vertx.vertx();
try {
weld.select(VertxExtension.class).get().registerConsumers(vertx, weld.event());
vertx.eventBus().send(HelloObserver.HELLO_ADDRESS, "hello");
assertEquals("hello", SYNCHRONIZER.poll(Timeouts.DEFAULT_TIMEOUT, TimeUnit.MILLISECONDS));
} finally {
vertx.close();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!