// 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));
}
}
OpenJPAConfiguration conf = factory.getConfiguration();
setPersistenceEnvironmentInfo(conf, pui);
_log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
// Create appropriate LifecycleEventManager
loadValidator(factory);