db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oyste...@apache.org
Subject svn commit: r636369 - in /db/derby/code/branches/10.4/java: drda/org/apache/derby/impl/drda/ drda/org/apache/derby/loc/drda/ testing/org/apache/derbyTesting/functionTests/master/
Date Wed, 12 Mar 2008 15:32:11 GMT
Author: oysteing
Date: Wed Mar 12 08:32:08 2008
New Revision: 636369

URL: http://svn.apache.org/viewvc?rev=636369&view=rev
Log:
DERBY-2954:
Remove NetworkServerControl commands for replication.

Modified:
    db/derby/code/branches/10.4/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
    db/derby/code/branches/10.4/java/drda/org/apache/derby/loc/drda/messages_en.properties
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/maxthreads.out
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/timeslice.out

Modified: db/derby/code/branches/10.4/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java?rev=636369&r1=636368&r2=636369&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
(original)
+++ db/derby/code/branches/10.4/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Wed Mar 12 08:32:08 2008
@@ -95,25 +95,13 @@
 
 */
 public final class NetworkServerControlImpl {
-	private final static int NO_USAGE_MSGS= 16;
-
-	//The COMMANDS array stores the list of commands that the
-	//NetworkServerControl class understands. Each index in 
-	//this array contains a particular command.
-
-	//Index 10 in this array is a command that is not present in the 
-	//COMMAND array. It refers to COMMAND_PROPERTIES which refers to 
-	//the command the network server receives from the client.
-
-	//Hence index 10 is replaced by an empty string and the replication
-	//related commands start from index 11.
+	private final static int NO_USAGE_MSGS= 12;
 	private final static String [] COMMANDS = 
 	{"start","shutdown","trace","tracedirectory","ping", 
-	 "logconnections", "sysinfo", "runtimeinfo",  "maxthreads", "timeslice",
-	"", "startreplication", "startslave", "failover", "stopreplication"};
+	 "logconnections", "sysinfo", "runtimeinfo",  "maxthreads", "timeslice", ""};
 	// number of required arguments for each command
 	private final static int [] COMMAND_ARGS =
-	{0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1};
+	{0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0};
 	public final static int COMMAND_START = 0;
 	public final static int COMMAND_SHUTDOWN = 1;
 	public final static int COMMAND_TRACE = 2;
@@ -125,14 +113,10 @@
 	public final static int COMMAND_MAXTHREADS = 8;
 	public final static int COMMAND_TIMESLICE = 9;
 	public final static int COMMAND_PROPERTIES = 10;
-	public final static int COMMAND_START_MASTER = 11;
-	public final static int COMMAND_START_SLAVE = 12;
-	public final static int COMMAND_START_FAILOVER = 13;
-	public final static int COMMAND_STOP_REPLICATION = 14;
 	public final static int COMMAND_UNKNOWN = -1;
 	public final static String [] DASHARGS =
 	{"p", "d", "user", "password", "ld", "ea", "ep", "b", "h", "s",
-		 "noSecurityManager", "ssl", "slavehost", "slaveport"};
+		 "noSecurityManager", "ssl"};
 	public final static int DASHARG_PORT = 0;
 	public final static int DASHARG_DATABASE = 1;
 	public final static int DASHARG_USER = 2;
@@ -145,8 +129,6 @@
 	public final static int DASHARG_SESSION = 9;
 	public final static int DASHARG_UNSECURE = 10;
 	private final static int DASHARG_SSL = 11;
-	private final static int DASHARG_SLAVEHOST = 12;
-	private final static int DASHARG_SLAVEPORT = 13;
 
 	// command protocol version - you need to increase this number each time
 	// the command protocol changes 
@@ -252,8 +234,6 @@
 	private InetAddress hostAddress;
 	private int sessionArg;
 	private boolean unsecureArg;
-	private String slavehost;
-	private int slaveport;
 
 	// Used to debug memory in SanityManager.DEBUG mode
 	private memCheck mc;
@@ -296,8 +276,6 @@
 	private boolean cleanupOnStart = false;	// Should we clean up when starting the server?
 	private boolean restartFlag = false;
 
-	private String replicationdb; //The name of the database that is replicated.
-
     protected final static int INVALID_OR_NOTSET_SECURITYMECHANISM = -1; 
     // variable to store value set to derby.drda.securityMechanism
     // default value is -1 which indicates that this property isnt set or
@@ -2231,26 +2209,6 @@
 				netSetTimeSlice(timeslice);
 				
 				break;
-			case COMMAND_START_MASTER: {
-				setReplicationDB((String) commandArgs.elementAt(0));
-				consolePropertyMessage("DRDA_ReplicationImplementation.I");
-				break;
-			}
-			case COMMAND_START_SLAVE: {
-				setReplicationDB((String) commandArgs.elementAt(0));
-				consolePropertyMessage("DRDA_ReplicationImplementation.I");
-				break;
-			}
-			case COMMAND_START_FAILOVER:  {
-				setReplicationDB((String) commandArgs.elementAt(0));
-				consolePropertyMessage("DRDA_ReplicationImplementation.I");
-				break;
-			}
-			case COMMAND_STOP_REPLICATION: {
-				setReplicationDB((String) commandArgs.elementAt(0));
-				consolePropertyMessage("DRDA_ReplicationImplementation.I");
-				break;
-			}
 			default:
 				//shouldn't get here
 				if (SanityManager.DEBUG)
@@ -2306,10 +2264,8 @@
 			{
 				for (i = 0; i < COMMANDS.length; i++)
 				{
-					if (COMMANDS[i].length () > 0 && 
-					    StringUtil.SQLEqualsIgnoreCase(
-					    COMMANDS[i],
-					    (String) commandArgs.firstElement())) 
+					if (StringUtil.SQLEqualsIgnoreCase(COMMANDS[i], 
+													   (String)commandArgs.firstElement()))
 					{
 						commandArgs.removeElementAt(0);
 						return i;
@@ -2437,37 +2393,6 @@
 				}
 				break;
 
-			case DASHARG_SLAVEHOST:
-				if (pos < args.length) {
-					slavehost = args[pos];
-				}
-				else {
-					consolePropertyMessage("DRDA_MissingValue.U",
-					"DRDA_Slavehost.I");
-				}
-			break;
-
-			case DASHARG_SLAVEPORT:
-				if (pos < args.length) {
-					try {
-					slaveport = Integer.parseInt(args[pos]);
-					}
-					catch(NumberFormatException nfe) {
-						//An invalid value has been assigned
-						//to the slaveport.
-						consolePropertyMessage
-						("DRDA_InvalidValue.U", 
-						new String [] {args[pos], 
-						"DRDA_Slaveport.I"});
-					}
-				}
-				else {
-					consolePropertyMessage
-					("DRDA_MissingValue.U",
-					"DRDA_Slaveport.I");
-				}
-			break;
-
 			default:
 				//shouldn't get here
 		}
@@ -3518,16 +3443,6 @@
 				thread.setLogConnections(value);
 			}
 		}
-	}
-
-	/**
-	* Set the current value for the Replication Database.
-	*
-	* @param db a String representing the name of the database being 
-	*           replicated.
-	*/
-	private void setReplicationDB(String db) {
-		replicationdb = db;
 	}
 
 	/**

Modified: db/derby/code/branches/10.4/java/drda/org/apache/derby/loc/drda/messages_en.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/drda/org/apache/derby/loc/drda/messages_en.properties?rev=636369&r1=636368&r2=636369&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/drda/org/apache/derby/loc/drda/messages_en.properties
(original)
+++ db/derby/code/branches/10.4/java/drda/org/apache/derby/loc/drda/messages_en.properties
Wed Mar 12 08:32:08 2008
@@ -86,10 +86,6 @@
 DRDA_MissingNetworkJar.S=Cannot find derbynet.jar on the classpath.
 DRDA_NoAuthentication.S=Network Server startup failed. User authentication must be enabled
before the Network Server installs a security manager. You must either enable user authentication
or disable the installation of a security manager. For information on enabling user authentication,
see the section of the Derby Developer's Guide entitled "Working with user authentication".
Disabling the installation of a security manager is strongly discouraged in a client/server
environment. However, if you must do this, you can disable the installation of a security
manager by specifying the "-noSecurityManager" command line option when you bring up the Network
Server.
 DRDA_SecurityInstalled.I=Security manager installed using the Basic server security policy.
-DRDA_Slavehost.I=slave host
-DRDA_Slaveport.I=slave port number
-DRDA_ReplicationDB.I=replication database
-DRDA_ReplicationImplementation.I=Replication Not Implemented Yet
 
 # Derby Network Server SYSINFO stuff
 #
@@ -128,10 +124,7 @@
 DRDA_Usage10.I=timeslice <milliseconds>[-h <host>][-p <portnumber>] [-ssl
<sslmode>]
 DRDA_Usage11.I=trace {on|off} [-s <session id>][-h <host>][-p <portnumber>]
[-ssl <sslmode>]
 DRDA_Usage12.I=tracedirectory <traceDirectory>[-h <host>][-p <portnumber>]
[-ssl <sslmode>]
-DRDA_Usage13.I=startreplication <dbname> [-slavehost <host>] [-slaveport <portnumber>]
[-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-DRDA_Usage14.I=startslave <dbname> [-slavehost <host>] [-slaveport <portnumber>]
[-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-DRDA_Usage15.I=failover <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-DRDA_Usage16.I=stopreplication <dbname> [-h <host>] [-p <portnumber>] [-ssl
<sslmode>]
+
 
 
 

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out?rev=636369&r1=636368&r2=636369&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out
(original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/derbyrunjartest.out
Wed Mar 12 08:32:08 2008
@@ -38,8 +38,4 @@
 maxthreads <max>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
 timeslice <milliseconds>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
 trace {on|off} [-s <session id>][-h <host>][-p <portnumber>] [-ssl <sslmode>]
-tracedirectory <traceDirectory>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
-startreplication <dbname> [-slavehost <host>] [-slaveport <portnumber>]
[-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-startslave <dbname> [-slavehost <host>] [-slaveport <portnumber>] [-h <host>]
[-p <portnumber>] [-ssl <sslmode>]
-failover <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-stopreplication <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
+tracedirectory <traceDirectory>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
\ No newline at end of file

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/maxthreads.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/maxthreads.out?rev=636369&r1=636368&r2=636369&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/maxthreads.out
(original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/maxthreads.out
Wed Mar 12 08:32:08 2008
@@ -19,10 +19,6 @@
 timeslice <milliseconds>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
 trace {on |off} [-s <session id>][-h <host>][-p <portnumber>] [-ssl <sslmode>]
 tracedirectory <traceDirectory>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
-startreplication <dbname> [-slavehost <host>] [-slaveport <portnumber>]
[-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-startslave <dbname> [-slavehost <host>] [-slaveport <portnumber>] [-h <host>]
[-p <portnumber>] [-ssl <sslmode>]
-failover <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-stopreplication <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
 PASS - max threads value, 0 is correct
 org.apache.derby.drda.NetworkServerControl maxthreads 2147483647 
 Max threads changed to 2147483647.
@@ -44,10 +40,6 @@
 timeslice <milliseconds>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
 trace {on |off} [-s <session id>][-h <host>][-p <portnumber>] [-ssl <sslmode>]
 tracedirectory <traceDirectory>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
-startreplication <dbname> [-slavehost <host>] [-slaveport <portnumber>]
[-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-startslave <dbname> [-slavehost <host>] [-slaveport <portnumber>] [-h <host>]
[-p <portnumber>] [-ssl <sslmode>]
-failover <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-stopreplication <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
 PASS - max threads value, 0 is correct
 PASS - max threads value, 0 is correct
 DRDA_InvalidValue.U:Invalid value, -2, for maxthreads.

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/timeslice.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/timeslice.out?rev=636369&r1=636368&r2=636369&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/timeslice.out
(original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/master/timeslice.out
Wed Mar 12 08:32:08 2008
@@ -19,10 +19,6 @@
 timeslice <milliseconds>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
 trace {on |off} [-s <session id>][-h <host>][-p <portnumber>] [-ssl <sslmode>]
 tracedirectory <traceDirectory>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
-startreplication <dbname> [-slavehost <host>] [-slaveport <portnumber>]
[-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-startslave <dbname> [-slavehost <host>] [-slaveport <portnumber>] [-h <host>]
[-p <portnumber>] [-ssl <sslmode>]
-failover <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-stopreplication <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
 PASS - time slice value, 0 is correct
 org.apache.derby.drda.NetworkServerControl timeslice 2147483647 
 Time slice changed to 2147483647.
@@ -44,10 +40,6 @@
 timeslice <milliseconds>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
 trace {on |off} [-s <session id>][-h <host>][-p <portnumber>] [-ssl <sslmode>]
 tracedirectory <traceDirectory>[-h <host>][-p <portnumber>] [-ssl <sslmode>]
-startreplication <dbname> [-slavehost <host>] [-slaveport <portnumber>]
[-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-startslave <dbname> [-slavehost <host>] [-slaveport <portnumber>] [-h <host>]
[-p <portnumber>] [-ssl <sslmode>]
-failover <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
-stopreplication <dbname> [-h <host>] [-p <portnumber>] [-ssl <sslmode>]
 PASS - time slice value, 0 is correct
 PASS - time slice value, 0 is correct
 Expecting exception:DRDA_InvalidValue.U:Invalid value, -2, for timeslice.



Mime
View raw message