本文整理了Java中org.jboss.weld.environment.se.Weld.setClassLoader()
方法的一些代码示例,展示了Weld.setClassLoader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Weld.setClassLoader()
方法的具体详情如下:
包路径:org.jboss.weld.environment.se.Weld
类名称:Weld
方法名:setClassLoader
[英]Set a ClassLoader. The given ClassLoader will be scanned automatically for bean archives if scanning is enabled.
[中]设置一个类加载器。如果启用扫描,给定的类加载器将自动扫描bean存档。
代码示例来源:origin: io.squark.yggdrasil/yggdrasil-cdi-provider
@Override
public void provide(YggdrasilConfiguration configuration) throws YggdrasilException {
logger.info("Initializing Weld container...");
System.setProperty("org.jboss.logging.provider", "slf4j");
Weld weld = new Weld();
weld.setClassLoader(CDIProvider.class.getClassLoader());
WeldContainer container = weld.initialize();
YggdrasilContext.registerObject(BeanManager.class.getName(), container.getBeanManager());
logger.info(CDIProvider.class.getSimpleName() + " initialized.");
}
代码示例来源:origin: io.squark.yggdrasil.yggdrasil-framework-provider/yggdrasil-cdi-provider
@Override
public void provide(YggdrasilConfiguration configuration) throws YggdrasilException {
logger.info("Initializing Weld container...");
System.setProperty("org.jboss.logging.provider", "slf4j");
Weld weld = new Weld();
weld.property(Weld.ARCHIVE_ISOLATION_SYSTEM_PROPERTY, false);
weld.setClassLoader(CDIProvider.class.getClassLoader());
WeldContainer container = weld.initialize();
YggdrasilContext.registerObject(BeanManager.class.getName(), container.getBeanManager());
logger.info(CDIProvider.class.getSimpleName() + " initialized.");
}
代码示例来源:origin: jbosstm/narayana
.disableDiscovery()
.addExtensions(LraAnnotationProcessingExtension.class)
.setClassLoader(classLoader)
.addBeanClasses(clazzNames.toArray(new Class[clazzNames.size()]));
代码示例来源:origin: io.thorntail/container
weld.setClassLoader(module.getClassLoader());
代码示例来源:origin: thorntail/thorntail
weld.setClassLoader(module.getClassLoader());
代码示例来源:origin: org.wildfly.swarm/container
weld.setClassLoader(module.getClassLoader());
内容来源于网络,如有侵权,请联系作者删除!