* beans and events can be accessed.
*
* @return weld container
*/
public WeldContainer initialize() {
ResourceLoader resourceLoader = new WeldResourceLoader();
// check for beans.xml
if (resourceLoader.getResource(WeldDeployment.BEANS_XML) == null) {
throw CommonLogger.LOG.missingBeansXml();
}
final CDI11Bootstrap bootstrap;
try {
bootstrap = (CDI11Bootstrap) resourceLoader.classForName(BOOTSTRAP_IMPL_CLASS_NAME).newInstance();
} catch (InstantiationException ex) {
throw CommonLogger.LOG.errorLoadingWeld();
} catch (IllegalAccessException ex) {
throw CommonLogger.LOG.errorLoadingWeld();
}