mirror of https://github.com/apache/openjpa.git
OPENJPA-477 no need to make changes to BootStrap, StateManagerImpl and PersistenceProviderImpl.
These files are restored to their previous version. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@615806 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
37c4e9148a
commit
b2a10e285f
|
@ -39,7 +39,7 @@ import org.apache.openjpa.util.UserException;
|
|||
*/
|
||||
public class Bootstrap {
|
||||
|
||||
protected static final Class[] FACTORY_ARGS =
|
||||
private static final Class[] FACTORY_ARGS =
|
||||
new Class[]{ ConfigurationProvider.class };
|
||||
|
||||
private static Localizer s_loc = Localizer.forPackage(Bootstrap.class);
|
||||
|
@ -124,7 +124,7 @@ public class Bootstrap {
|
|||
return (BrokerFactory) meth.invoke(null, new Object[]{ conf });
|
||||
}
|
||||
|
||||
protected static String getFactoryClassName(ConfigurationProvider conf,
|
||||
private static String getFactoryClassName(ConfigurationProvider conf,
|
||||
ClassLoader loader) {
|
||||
try {
|
||||
return getFactoryClass(conf, loader).getName();
|
||||
|
|
|
@ -3001,7 +3001,7 @@ public class StateManagerImpl
|
|||
/**
|
||||
* Mark the field as loaded or unloaded.
|
||||
*/
|
||||
public void setLoaded(int field, boolean isLoaded) {
|
||||
private void setLoaded(int field, boolean isLoaded) {
|
||||
// don't continue if loaded state is already correct; otherwise we
|
||||
// can end up clearing _fieldImpl when we shouldn't
|
||||
if (_loaded.get(field) == isLoaded)
|
||||
|
|
|
@ -71,7 +71,7 @@ public class PersistenceProviderImpl
|
|||
*/
|
||||
public OpenJPAEntityManagerFactory createEntityManagerFactory(String name,
|
||||
String resource, Map m) {
|
||||
PersistenceProductDerivation pd = newPersistenceProductDerivation();
|
||||
PersistenceProductDerivation pd = new PersistenceProductDerivation();
|
||||
try {
|
||||
Object poolValue = Configurations.removeProperty(EMF_POOL, m);
|
||||
ConfigurationProvider cp = pd.load(resource, name, m);
|
||||
|
@ -99,7 +99,7 @@ public class PersistenceProviderImpl
|
|||
}
|
||||
|
||||
if (poolValue == null || !((Boolean) poolValue).booleanValue())
|
||||
return newBrokerFactory(cp, loader);
|
||||
return Bootstrap.newBrokerFactory(cp, loader);
|
||||
else
|
||||
return Bootstrap.getBrokerFactory(cp, loader);
|
||||
}
|
||||
|
@ -199,19 +199,4 @@ public class PersistenceProviderImpl
|
|||
return _trans.transform(cl, name, previousVersion, pd, bytes);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a persistence product deviration with default setting.
|
||||
*/
|
||||
public PersistenceProductDerivation newPersistenceProductDerivation() {
|
||||
return new PersistenceProductDerivation();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a broker factory for the given configuration and class loader.
|
||||
*/
|
||||
public BrokerFactory newBrokerFactory(ConfigurationProvider cp,
|
||||
ClassLoader loader) {
|
||||
return Bootstrap.newBrokerFactory(cp, loader);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue