db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1071161 - in /db/derby/code/branches/10.6: ./ java/engine/org/apache/derby/impl/services/monitor/ java/engine/org/apache/derby/impl/store/raw/data/ java/engine/org/apache/derby/loc/ java/shared/org/apache/derby/shared/common/reference/
Date Wed, 16 Feb 2011 07:01:02 GMT
Author: mamta
Date: Wed Feb 16 07:01:02 2011
New Revision: 1071161

URL: http://svn.apache.org/viewvc?rev=1071161&view=rev
Log:
DERBY-4601 Shutting down just a single database should log a different message than shutting
down the system

Backporting 966393 and 967201 into 10.5 codeline. Will migrate the rest of the commits for
DERBY-4601 as separate checkin


Modified:
    db/derby/code/branches/10.6/   (props changed)
    db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
    db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
    db/derby/code/branches/10.6/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/branches/10.6/java/shared/org/apache/derby/shared/common/reference/MessageId.java

Propchange: db/derby/code/branches/10.6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 16 07:01:02 2011
@@ -1,2 +1,2 @@
-/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,942286,942476,942480,942587,944152,946794,948045,948069,951346,951366,952138,952237,952581,954344,954421,954544,954748,955001,955540,955634,956075,956234,956445,956569,956659,957260,957902,958163,958257,958264,958508,958522,958555,958618,958939,959550,961892,962716,963206,963705,964039,964115,964402,965647,967304,980089,980684,986689,986834,987539,989099,990292,997325,998170,999119,999479,999485,1002291,1002682,1002853,1021426,1025795,1028716,1030043,1033485,1033864,1038514,1040658,1053724,1055169,1062096,1063809,1065061,1067250
+/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,942286,942476,942480,942587,944152,946794,948045,948069,951346,951366,952138,952237,952581,954344,954421,954544,954748,955001,955540,955634,956075,956234,956445,956569,956659,957260,957902,958163,958257,958264,958508,958522,958555,958618,958939,959550,961892,962716,963206,963705,964039,964115,964402,965647,966393,967201,967304,980089,980684,986689,986834,987539,989099,990292,997325,998170,999119,999479,999485,1002291,1002682,1002853,1021426,1025795,1028716,1030043,1033485,1033864,1038514,1040658,1053724,1055169,1062096,1063809,1065061,1067250
 /db/derby/docs/trunk:954344

Modified: db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java?rev=1071161&r1=1071160&r2=1071161&view=diff
==============================================================================
--- db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
(original)
+++ db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
Wed Feb 16 07:01:02 2011
@@ -45,6 +45,7 @@ import org.apache.derby.iapi.error.Shutd
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.uuid.UUIDFactory;
 import org.apache.derby.iapi.services.timer.TimerFactory;
+import org.apache.derby.iapi.reference.MessageId;
 import org.apache.derby.iapi.reference.Module;
 import org.apache.derby.iapi.reference.Property;
 import org.apache.derby.iapi.reference.SQLState;
@@ -68,6 +69,8 @@ import org.apache.derby.iapi.services.jm
 
 import org.apache.derby.impl.services.monitor.StorageFactoryService;
 
+import org.apache.derby.iapi.util.CheapDateFormatter;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringWriter;
@@ -117,6 +120,9 @@ abstract class BaseMonitor
 		Hash table of objects that implement PersistentService keyed by their getType() method.
 	*/
 	private HashMap serviceProviders = new HashMap();
+	private static final String LINE = 
+        "----------------------------------------------------------------";
+    private final static char COLON = ':';
 
 	// Vector of class objects of implementations, found in the System, application
 	// and default (modules.properties) properties
@@ -173,6 +179,13 @@ abstract class BaseMonitor
 				return;
 			inShutdown = true;
 		}
+		long shutdownTime = System.currentTimeMillis();
+		//Make a note of Engine shutdown in the log file
+		Monitor.getStream().printlnWithHeader("\n" +
+				COLON +
+                MessageService.getTextMessage(
+                    MessageId.CONN_SHUT_DOWN_ENGINE));
+		Monitor.getStream().println(LINE);
 
 		if (SanityManager.DEBUG && reportOn) {
 			report("Shutdown request");

Modified: db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java?rev=1071161&r1=1071160&r2=1071161&view=diff
==============================================================================
--- db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
(original)
+++ db/derby/code/branches/10.6/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Wed Feb 16 07:01:02 2011
@@ -484,7 +484,8 @@ public class BaseDataFileFactory
 		logMsg("\n" + CheapDateFormatter.formatDate(shutdownTime) +
                 MessageService.getTextMessage(
                     MessageId.STORE_SHUTDOWN_MSG,
-                    getIdentifier(), 
+                    getIdentifier(),
+                    getRootDirectory(),
                     // print object and ide of classloader.
                     // Cast to object so we don't get just the toString() 
                     // method

Modified: db/derby/code/branches/10.6/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/java/engine/org/apache/derby/loc/messages.xml?rev=1071161&r1=1071160&r2=1071161&view=diff
==============================================================================
--- db/derby/code/branches/10.6/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/branches/10.6/java/engine/org/apache/derby/loc/messages.xml Wed Feb 16 07:01:02
2011
@@ -7485,8 +7485,9 @@ Loaded from {4}</text>
             <msg>
                 <name>D002</name>
                 <text>:
-Shutting down instance {0} with class loader {1} </text>
+Shutting down instance {0} on database directory {1} with class loader {2} </text>
                 <arg>id</arg>
+                <arg>dbDirectory</arg>
 		<arg>classloader</arg>
             </msg>
 
@@ -7615,6 +7616,11 @@ Shutting down instance {0} with class lo
             <title>Undocumented JDBC Messages</title>
 
             <msg>
+                <name>J003</name>
+                <text>Shutting down Derby Engine</text>
+            </msg>
+
+            <msg>
                 <name>J004</name>
                 <text>database identity</text>
             </msg>

Modified: db/derby/code/branches/10.6/java/shared/org/apache/derby/shared/common/reference/MessageId.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/java/shared/org/apache/derby/shared/common/reference/MessageId.java?rev=1071161&r1=1071160&r2=1071161&view=diff
==============================================================================
--- db/derby/code/branches/10.6/java/shared/org/apache/derby/shared/common/reference/MessageId.java
(original)
+++ db/derby/code/branches/10.6/java/shared/org/apache/derby/shared/common/reference/MessageId.java
Wed Feb 16 07:01:02 2011
@@ -111,6 +111,7 @@ public interface MessageId {
 	/*
 	** Connectivity
 	*/
+	String CONN_SHUT_DOWN_ENGINE		    = "J003"; // shutting down Derby Engine
 	String CONN_DATABASE_IDENTITY			= "J004"; // database identity
 	String CONN_SHUT_DOWN_CLOUDSCAPE		= "J005"; // shut down Derby
 	String CONN_CREATE_DATABASE				= "J007"; // create database



Mime
View raw message