db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r508163 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java
Date Thu, 15 Feb 2007 21:29:35 GMT
Author: djd
Date: Thu Feb 15 13:29:34 2007
New Revision: 508163

URL: http://svn.apache.org/viewvc?view=rev&rev=508163
Log:
DERBY-2341 Ensure modules booting after the store by the database receive the correct properties
object that also includes the set of database properties.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java?view=diff&rev=508163&r1=508162&r2=508163
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java Thu Feb 15
13:29:34 2007
@@ -144,8 +144,6 @@
         return Monitor.isDesiredCreateType(startParams, getEngineType());
 	}
 
-	protected Properties allParams;	// properties to be used *only* while booting.
-
 	public void boot(boolean create, Properties startParams)
 		throws StandardException
 	{
@@ -185,7 +183,10 @@
 		myUUID = makeDatabaseID(create, startParams);
 
 
-		allParams = new DoubleProperties(getAllDatabaseProperties(), startParams);
+        // Add the database properties read from disk (not stored
+        // in service.properties) into the set seen by booting modules.
+		Properties allParams =
+            new DoubleProperties(getAllDatabaseProperties(), startParams);
 
 		if (pf != null)
 			pf.addPropertySetNotification(this);
@@ -196,12 +197,12 @@
         
         dd = (DataDictionary)
             Monitor.bootServiceModule(create, this,
-                    DataDictionary.MODULE, startParams);
+                    DataDictionary.MODULE, allParams);
 
 		lcf = (LanguageConnectionFactory) Monitor.bootServiceModule(create, this, LanguageConnectionFactory.MODULE,
allParams);
 		lf = (LanguageFactory) Monitor.bootServiceModule(create, this, LanguageFactory.MODULE,
allParams);
 
-		bootResourceAdapter(create, startParams);
+		bootResourceAdapter(create, allParams);
 
 
 		// may also want to set up a check that we are a singleton,
@@ -229,8 +230,6 @@
 
 		active = true;
 
-		if (lastToBoot)
-			allParams = null; // should not be used anymore
 	}
 
 	public void stop() {
@@ -746,6 +745,10 @@
 		af = (AccessFactory) Monitor.bootServiceModule(create, this, AccessFactory.MODULE, startParams);
 	}
 
+    /**
+     * Get the set of database properties from the set stored
+     * on disk outside of service.properties.
+     */
 	protected Properties getAllDatabaseProperties()
 		throws StandardException {
 
@@ -758,7 +761,7 @@
 		return dbProps;
 	}
 
-	protected void bootResourceAdapter(boolean create, Properties startParams) {
+	protected void bootResourceAdapter(boolean create, Properties allParams) {
 
 		// Boot resource adapter - only if we are running Java 2 or
 		// beyondwith JDBC20 extension, JTA and JNDI classes in the classpath



Mime
View raw message