mirror of https://github.com/apache/openjpa.git
OPENJPA-1237: allow customized MappingRepository
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@821236 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
31c4790c32
commit
97aca65ddc
|
@ -86,6 +86,10 @@ public class JDBCBrokerFactory
|
|||
super(conf);
|
||||
}
|
||||
|
||||
public JDBCBrokerFactory(JDBCConfiguration conf, boolean earlyInit) {
|
||||
super(conf, earlyInit);
|
||||
}
|
||||
|
||||
public Map<String,Object> getProperties() {
|
||||
// add platform property
|
||||
Map<String,Object> props = super.getProperties();
|
||||
|
|
|
@ -150,10 +150,13 @@ public abstract class AbstractBrokerFactory
|
|||
return (AbstractBrokerFactory) _pool.get(key);
|
||||
}
|
||||
|
||||
protected AbstractBrokerFactory(OpenJPAConfiguration config) {
|
||||
this(config, true);
|
||||
}
|
||||
/**
|
||||
* Constructor. Configuration must be provided on construction.
|
||||
*/
|
||||
protected AbstractBrokerFactory(OpenJPAConfiguration config) {
|
||||
protected AbstractBrokerFactory(OpenJPAConfiguration config, boolean earlyInit) {
|
||||
_conf = config;
|
||||
_brokers = newBrokerSet();
|
||||
getPcClassLoaders();
|
||||
|
@ -164,6 +167,8 @@ public abstract class AbstractBrokerFactory
|
|||
_conf.getConnectionRetainModeConstant(), false).close();
|
||||
}
|
||||
|
||||
if (!earlyInit)
|
||||
return;
|
||||
// This eager metadata loading is invoked at construction.
|
||||
// It can not happen during the MetaDataRepository configuration because
|
||||
// within a container environment an uninitialized repository must be passed
|
||||
|
|
Loading…
Reference in New Issue