final Options options = SystemInstance.get().getOptions();
if (SystemInstance.get().getComponent(DataSourceCreator.class) == null) {
final String creator = options.get(OPENEJB_JDBC_DATASOURCE_CREATOR, (String) null);
if (creator == null) {
SystemInstance.get().setComponent(DataSourceCreator.class, new DefaultDataSourceCreator());
} else {
try {
SystemInstance.get().setComponent(DataSourceCreator.class, DataSourceFactory.creator(creator, false));
} catch (final Exception e) {
logger.error("can't load " + creator + " will use the default creator", e);
SystemInstance.get().setComponent(DataSourceCreator.class, new DefaultDataSourceCreator());
}
}
}
if (SystemInstance.get().getComponent(ClassLoaderEnricher.class) == null) {
SystemInstance.get().setComponent(ClassLoaderEnricher.class, new ClassLoaderEnricher());