openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r627668 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
Date Thu, 14 Feb 2008 05:43:25 GMT
Author: allee8285
Date: Wed Feb 13 21:43:22 2008
New Revision: 627668

URL: http://svn.apache.org/viewvc?rev=627668&view=rev
Log:
Enable PersisentProviderImpl subclass to override the default BrokerImpl alias if none is
defined in application.

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java?rev=627668&r1=627667&r2=627668&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
Wed Feb 13 21:43:22 2008
@@ -136,7 +136,7 @@
             if (!Configurations.containsProperty(BrokerValue.KEY,
                 cp.getProperties())) {
                 cp.addProperty("openjpa." + BrokerValue.KEY, 
-                    BrokerValue.NON_FINALIZING_ALIAS);
+                    getDefaultBrokerAlias());
             }
 
             BrokerFactory factory = getBrokerFactory(cp, poolValue,
@@ -157,6 +157,15 @@
         } catch (Exception e) {
             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;
     }
     
     /**



Mime
View raw message