use of org.commonjava.indy.boot.BootOptions in project indy by Commonjava.
the class JaxRsBooter method initialize.
@Override
public boolean initialize(final BootOptions bootOptions) {
this.bootOptions = bootOptions;
boolean initialized;
try {
bootOptions.setSystemProperties();
weld = new Weld();
container = weld.initialize();
// injectable version.
final BootOptions cdiOptions = container.instance().select(BootOptions.class).get();
cdiOptions.copyFrom(bootOptions);
final BeanManager bmgr = container.getBeanManager();
logger.info("\n\n\nStarted BeanManager: {}\n\n\n", bmgr);
initialized = true;
} catch (final Throwable e) {
logger.error("Failed to initialize Booter: " + e.getMessage(), e);
exit = ERR_CANT_INIT_BOOTER;
status = new BootStatus(exit, e);
initialized = false;
}
return initialized;
}
Aggregations