Enable PersisentProviderImpl subclass to override the default BrokerImpl alias if none is defined in application.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@627668 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Albert Lee 2008-02-14 05:43:22 +00:00
parent 68f25ced84
commit 7ca1cfe20c
1 changed files with 10 additions and 1 deletions

View File

@ -136,7 +136,7 @@ public class PersistenceProviderImpl
if (!Configurations.containsProperty(BrokerValue.KEY,
cp.getProperties())) {
cp.addProperty("openjpa." + BrokerValue.KEY,
BrokerValue.NON_FINALIZING_ALIAS);
getDefaultBrokerAlias());
}
BrokerFactory factory = getBrokerFactory(cp, poolValue,
@ -158,6 +158,15 @@ public class PersistenceProviderImpl
throw PersistenceExceptions.toPersistenceException(e);
}
}
/*
* Returns a default Broker alias to be used when no openjpa.BrokerImpl
* is specified. This method allows PersistenceProvider subclass to
* override the default broker alias.
*/
protected String getDefaultBrokerAlias() {
return BrokerValue.NON_FINALIZING_ALIAS;
}
/**
* Java EE 5 class transformer.