// should be doing proper resource management.
if (!Configurations.containsProperty(BrokerValue.KEY, cp.getProperties())) {
cp.addProperty("openjpa." + BrokerValue.KEY, getDefaultBrokerAlias());
}
BrokerFactory factory = getBrokerFactory(cp, poolValue, pui.getClassLoader());
if (transformerException != null) {
Log log = factory.getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME);
if (log.isTraceEnabled()) {
log.warn(_loc.get("transformer-registration-error-ex", pui), transformerException);
} else {
log.warn(_loc.get("transformer-registration-error", pui));
}
}
// Create appropriate LifecycleEventManager
OpenJPAConfiguration conf = factory.getConfiguration();
_log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
loadValidator(_log, conf);
// We need to wait to preload until after we get back a fully configured/instantiated
// BrokerFactory. This is because it is possible that someone has extended OpenJPA
// functions and they need to be allowed time to configure themselves before we go off and