db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r540789 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Date Tue, 22 May 2007 23:29:06 GMT
Author: kmarsden
Date: Tue May 22 16:29:05 2007
New Revision: 540789

URL: http://svn.apache.org/viewvc?view=rev&rev=540789
Log:
DERBY-1465 NetworkServerControl.start() should throw an exception and not just print exceptions
if the server fails to start

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java?view=diff&rev=540789&r1=540788&r2=540789
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
(original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Tue May 22 16:29:05 2007
@@ -213,6 +213,11 @@
 	private InetAddress hostAddress;
 	private int sessionArg;
 	private boolean unsecureArg;
+	
+	/** Any exception that occurs during 
+	 *  start up will be saved in this variable and
+	 *  thrown by the start method.
+	 */
 	private Exception runtimeException = null;
 
 	// Used to debug memory in SanityManager.DEBUG mode
@@ -235,6 +240,10 @@
 	private boolean traceAll;			// trace all sessions
 	private Object traceAllSync = new Object();	// object to use for syncing reading
 										// and changing trace all
+	/**
+	 * Object to sync the start of network server and wait until server startup is 
+	 * complete
+	 */
 	private Object serverStartSync = new Object();	// for syncing start of server.
 	private boolean logConnections;		// log connects
 	private Object logConnectionsSync = new Object(); // object to use for syncing 
@@ -594,6 +603,12 @@
 		    // up.     
 		   
 		    t.start();
+		    // We wait on the serverStartComplete object until
+		    // blocking_start sends a notify to tell us the 
+		    // server is up. Then we throw any exception that 
+		    // occurred on startup. blocking_start will remain
+		    // blocked on shutdownSync until it gets a shutdown
+		    // command.
 		    synchronized(serverStartComplete){
 		    	serverStartComplete.wait();
 		    }



Mime
View raw message