db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r957382 - in /db/derby/code/branches/10.4: ./ java/engine/org/apache/derby/iapi/reference/Property.java java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Date Wed, 23 Jun 2010 22:27:27 GMT
Author: mamta
Date: Wed Jun 23 22:27:27 2010
New Revision: 957382

URL: http://svn.apache.org/viewvc?rev=957382&view=rev
Log:
Migrating DERBY-4588 to 10.4 codeline


Modified:
    db/derby/code/branches/10.4/   (props changed)
    db/derby/code/branches/10.4/java/engine/org/apache/derby/iapi/reference/Property.java
    db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java

Propchange: db/derby/code/branches/10.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun 23 22:27:27 2010
@@ -1,2 +1,2 @@
 /db/derby/code/branches/10.5:814216
-/db/derby/code/trunk:788436,793588,794303,796316,796372,797147,798347,798742,800523,803548,805696,809643,812669,816536,835286,882732,915733,946794,954544
+/db/derby/code/trunk:788436,793588,794303,796316,796372,797147,798347,798742,800523,803548,805696,809643,812669,816536,835286,882732,915733,934996,946794,954544

Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/iapi/reference/Property.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/engine/org/apache/derby/iapi/reference/Property.java?rev=957382&r1=957381&r2=957382&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/engine/org/apache/derby/iapi/reference/Property.java
(original)
+++ db/derby/code/branches/10.4/java/engine/org/apache/derby/iapi/reference/Property.java
Wed Jun 23 22:27:27 2010
@@ -75,6 +75,17 @@ public interface Property { 
 	*/
 	String LOG_SEVERITY_LEVEL = "derby.stream.error.logSeverityLevel";
 
+	/**
+	 * derby.stream.error.logBootTrace
+	 * <BR>
+	 * defaults to false. If set to true logs a stack trace to 
+	 * the error stream on successful boot or shutdown.
+	 * This can be useful when trying to debug dual boot 
+	 * scenarios especially with multiple class loaders.
+	 * 
+	 */
+	
+	String LOG_BOOT_TRACE = "derby.stream.error.logBootTrace";
         /**
 		derby.stream.error.file=<b>absolute or relative error log filename</b>
 		Takes precendence over derby.stream.error.method.

Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java?rev=957382&r1=957381&r2=957382&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
(original)
+++ db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/store/raw/data/BaseDataFileFactory.java
Wed Jun 23 22:27:27 2010
@@ -361,7 +361,8 @@ public class BaseDataFileFactory
         String readOnlyMsg = (isReadOnly()) 
             ? MessageService.getTextMessage(MessageId.STORE_BOOT_READONLY_MSG)
             : "";
-
+        boolean logBootTrace = Boolean.valueOf(startParams.getProperty(Property.LOG_BOOT_TRACE,
+               PropertyUtil.getSystemProperty(Property.LOG_BOOT_TRACE))).booleanValue();
 		logMsg(CheapDateFormatter.formatDate(bootTime) +
 			   MessageService.getTextMessage(MessageId.STORE_BOOT_MSG,
                                              jbmsVersion,
@@ -369,6 +370,8 @@ public class BaseDataFileFactory
                                              dataDirectory,
                                              readOnlyMsg));
 
+        if (logBootTrace)
+           Monitor.logThrowable(new Throwable("boot trace"));
 		uf = null;
 
 
@@ -466,10 +469,15 @@ public class BaseDataFileFactory
 		}
 
 		long shutdownTime = System.currentTimeMillis();
+		boolean logBootTrace = PropertyUtil.getSystemBoolean(Property.LOG_BOOT_TRACE);
 		logMsg("\n" + CheapDateFormatter.formatDate(shutdownTime) +
                 MessageService.getTextMessage(
                     MessageId.STORE_SHUTDOWN_MSG,
                     getIdentifier()));
+	
+		if (logBootTrace)
+			Monitor.logThrowable(new Throwable("shutdown trace"));
+			
 		istream.println(LINE);
 
 		if (!isCorrupt) 



Mime
View raw message