mirror of https://github.com/apache/openjpa.git
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:
parent
68f25ced84
commit
7ca1cfe20c
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue