db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r373291 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java
Date Sun, 29 Jan 2006 05:54:10 GMT
Author: kmarsden
Date: Sat Jan 28 21:54:06 2006
New Revision: 373291

URL: http://svn.apache.org/viewcvs?rev=373291&view=rev
Log:
DERBY-395  Server-side "trace on" and "trace off" commands do not appear to be working correctly.

Contributed by Bryan Pendleton

Attached is a proposed fix. derbyall passed. I put a small comment in the code. I didn't add
any new tests, which is unfortunate, but I didn't have any brilliant inside about an easy
way to add such tests. Testing with the server tracing is already somewhat of a PITA because
the server tracing interacts poorly with things like the security manager.


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

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java?rev=373291&r1=373290&r2=373291&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java Sat Jan 28
21:54:06 2006
@@ -30,8 +30,6 @@
 	ServerSocket serverSocket;
 	private int timeSlice;
 	private int connNum;
-	private String traceDir;
-	private boolean traceAll;
 
 		ClientThread (NetworkServerControlImpl nsi, ServerSocket ss) {
 
@@ -42,8 +40,6 @@
 			parent=nsi;
 			serverSocket=ss;
 			timeSlice=nsi.getTimeSlice();
-			traceDir=parent.getTraceDirectory();
-			traceAll=parent.getTraceAll();
 		}
 			
 		public void run() 
@@ -87,8 +83,14 @@
 							Integer.toString(connNum));
 
 				//create a new Session for this session
+				// Note that we always re-fetch the tracing
+				// configuration from the parent, because it
+				// may have changed (there are administrative
+				// commands which allow dynamic tracing
+				// reconfiguration).
 				clientSession = new Session(connNum, clientSocket, 
-					traceDir, traceAll);
+					parent.getTraceDirectory(),
+					parent.getTraceAll());
 
 				//add to Session list
 				parent.addToSessionTable(new Integer(connNum), clientSession);



Mime
View raw message