db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r169684 [3/3] - in /incubator/derby/code/trunk/java: drda/org/apache/derby/drda/ drda/org/apache/derby/impl/drda/ engine/org/apache/derby/iapi/jdbc/
Date Wed, 11 May 2005 19:41:08 GMT
Modified: incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java?rev=169684&r1=169683&r2=169684&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java (original)
+++ incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java Wed May
11 12:40:57 2005
@@ -281,8 +281,8 @@
 	protected boolean isCmd() throws DRDAProtocolException, java.io.UnsupportedEncodingException
 	{
 		ensureALayerDataInBuffer(4);
-		String val = new String(buffer, 0, 4, DB2jServerImpl.DEFAULT_ENCODING);
-		return DB2jServerImpl.isCmd(val);
+		String val = new String(buffer, 0, 4, NetworkServerControlImpl.DEFAULT_ENCODING);
+		return NetworkServerControlImpl.isCmd(val);
 	}
 
 	/**
@@ -1259,7 +1259,7 @@
 	protected String readStringData()
 		throws DRDAProtocolException
 	{
-		return readString((int)ddmScalarLen, DB2jServerImpl.DEFAULT_ENCODING);
+		return readString((int)ddmScalarLen, NetworkServerControlImpl.DEFAULT_ENCODING);
 	}
 
 	/**
@@ -1272,7 +1272,7 @@
 	protected String readStringData(int length)
 		throws DRDAProtocolException
 	{
-		return readString(length, DB2jServerImpl.DEFAULT_ENCODING);
+		return readString(length, NetworkServerControlImpl.DEFAULT_ENCODING);
 	}
 
 	/**
@@ -1421,7 +1421,7 @@
 
 		ensureBLayerDataInBuffer (length, ADJUST_LENGTHS);
 		String result = new String (buffer, pos, length,
-										DB2jServerImpl.DEFAULT_ENCODING);
+										NetworkServerControlImpl.DEFAULT_ENCODING);
 		pos += length;
 		return result;
 	}

Modified: incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java?rev=169684&r1=169683&r2=169684&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java (original)
+++ incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java Wed May
11 12:40:57 2005
@@ -1168,7 +1168,7 @@
 	protected void writeLDString(String s, int index) throws DRDAProtocolException
 	{
 		try {
-			byte [] byteval = s.getBytes(DB2jServerImpl.DEFAULT_ENCODING);
+			byte [] byteval = s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING);
 			int origLen = byteval.length;
 			boolean multiByteTrunc = false;
 			int writeLen =
@@ -1182,13 +1182,13 @@
 			1) Does the current byte start with the bit pattern 10xxxxxx?
 			2) If yes, move left and go to step #1.
 			3) Finished
-			We assume that DB2jServerImpl.DEFAULT_ENCODING remains UTF-8
+			We assume that NetworkServerControlImpl.DEFAULT_ENCODING remains UTF-8
 			*/
 
 			if (SanityManager.DEBUG)
 			{
-				if (!(DB2jServerImpl.DEFAULT_ENCODING.equals("UTF8")))
-					SanityManager.THROWASSERT("Encoding assumed to be UTF8, but is actually" + DB2jServerImpl.DEFAULT_ENCODING);
+				if (!(NetworkServerControlImpl.DEFAULT_ENCODING.equals("UTF8")))
+					SanityManager.THROWASSERT("Encoding assumed to be UTF8, but is actually" + NetworkServerControlImpl.DEFAULT_ENCODING);
 			}
 
 			if (writeLen != origLen)
@@ -1210,7 +1210,7 @@
 		}
 		catch (Exception e) {
 			//this should never happen
-			agent.agentError("Encoding " + DB2jServerImpl.DEFAULT_ENCODING + " not supported");
+			agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported");
 		}
 	}
 
@@ -1224,10 +1224,10 @@
 	protected void writeString(String s) throws DRDAProtocolException
 	{
 		try {
-			writeBytes(s.getBytes(DB2jServerImpl.DEFAULT_ENCODING));
+			writeBytes(s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING));
 		} catch (Exception e) {
 			//this should never happen
-			agent.agentError("Encoding " + DB2jServerImpl.DEFAULT_ENCODING + " not supported");
+			agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported");
 		}
 	}
 
@@ -1243,10 +1243,10 @@
 	{
 		byte[] bs = null;
 		try {
-			bs = s.getBytes(DB2jServerImpl.DEFAULT_ENCODING);
+			bs = s.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING);
 		} catch (Exception e) {
 			//this should never happen
-			agent.agentError("Encoding " + DB2jServerImpl.DEFAULT_ENCODING + " not supported");
+			agent.agentError("Encoding " + NetworkServerControlImpl.DEFAULT_ENCODING + " not supported");
 		}
 		int len = bs.length;
 		if (len >= length)
@@ -1254,7 +1254,7 @@
 		else
 		{
 			writeBytes(bs);
-			padBytes(DB2jServerImpl.SPACE_CHAR, length-len);
+			padBytes(NetworkServerControlImpl.SPACE_CHAR, length-len);
 		}
 	}
 

Modified: incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=169684&r1=169683&r2=169684&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Wed
May 11 12:40:57 2005
@@ -118,7 +118,7 @@
 	private int [] required = new int[MAX_REQUIRED_LEN];
 
 
-	private DB2jServerImpl server;			// server who created me
+	private NetworkServerControlImpl server;			// server who created me
 	private Session	session;	// information about the session
 	private long timeSlice;				// time slice for this thread
 	private Object timeSliceSync = new Object(); // sync object for updating time slice 
@@ -169,7 +169,7 @@
 	 * @param logConnections
 	 **/
 
-	public DRDAConnThread(Session session, DB2jServerImpl server, 
+	public DRDAConnThread(Session session, NetworkServerControlImpl server, 
 						  long timeSlice,
 						  boolean logConnections) {
 	
@@ -177,7 +177,7 @@
 
 		// Create a more meaningful name for this thread (but preserve its
 		// thread id from the default name).
-		DB2jServerImpl.setUniqueThreadName(this, "DRDAConnThread");
+		NetworkServerControlImpl.setUniqueThreadName(this, "DRDAConnThread");
 
 		this.session = session;
 		this.server = server;
@@ -323,7 +323,7 @@
 	 *
 	 * @return server
 	 */
-	protected DB2jServerImpl getServer()
+	protected NetworkServerControlImpl getServer()
 	{
 		return server;
 	}
@@ -1168,7 +1168,7 @@
 					// the protocol exception.  Then hopfully all
 					// will be well when they try again.
 					try {
-						server.startDB2j();
+						server.startNetworkServer();
 					} catch (Exception re) {
 						println2Log(database.dbName, session.drdaID, "Failed attempt to reload driver " +re.getMessage()
 );
 					}
@@ -4958,7 +4958,7 @@
 			// then we're here because of a shutdown exception;
 			// "clean up" by restarting the server.
 				try {
-					server.startDB2j();
+					server.startNetworkServer();
 				} catch (Exception restart)
 				// any error messages should have already been printed,
 				// so we ignore this exception here.

Modified: incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAProtocolException.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAProtocolException.java?rev=169684&r1=169683&r2=169684&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAProtocolException.java
(original)
+++ incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAProtocolException.java
Wed May 11 12:40:57 2005
@@ -284,7 +284,7 @@
 			DRDAConnThread.println2Log(agent.getDbName(),
 								   agent.getSession().drdaID, 
 								   msg);
-			DB2jServerImpl s = agent.getServer();
+			NetworkServerControlImpl s = agent.getServer();
 			s.consoleMessage(msg);
 			this.printStackTrace(s.logWriter);
 		}

Modified: incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java?rev=169684&r1=169683&r2=169684&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java (original)
+++ incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java Wed
May 11 12:40:57 2005
@@ -1256,10 +1256,10 @@
 		{
 			try {
 				BigInteger  consistTokenBi = 
-					new BigInteger(consistToken.getBytes(DB2jServerImpl.DEFAULT_ENCODING));
+					new BigInteger(consistToken.getBytes(NetworkServerControlImpl.DEFAULT_ENCODING));
 				BigInteger rsNumBi = BigInteger.valueOf(rsNum);
 				consistTokenBi = consistTokenBi.subtract(rsNumBi);
-				consistToken = new String(consistTokenBi.toByteArray(),DB2jServerImpl.DEFAULT_ENCODING);
+				consistToken = new String(consistTokenBi.toByteArray(),NetworkServerControlImpl.DEFAULT_ENCODING);
 			}
 			catch (UnsupportedEncodingException e)
 			{// Default encoding always supported

Modified: incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java?rev=169684&r1=169683&r2=169684&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java (original)
+++ incubator/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java Wed May
11 12:40:57 2005
@@ -245,7 +245,7 @@
                 // take care of case of SECMEC_USRIDONL
                 if(password != null) 
 		    p.put(Attribute.PASSWORD_ATTR, password);
-		Connection conn = DB2jServerImpl.getDriver().connect(Attribute.PROTOCOL
+		Connection conn = NetworkServerControlImpl.getDriver().connect(Attribute.PROTOCOL
 							 + dbName + attrString, p);
 		conn.setAutoCommit(false);
 		setConnection(conn);

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java?rev=169684&r1=169683&r2=169684&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java
Wed May 11 12:40:57 2005
@@ -44,7 +44,7 @@
 	private Method serverShutdownMethod;
     private boolean loadSysIBM;
     private Thread serverThread;
-    private static final String serverClassName = "org.apache.derby.impl.drda.DB2jServerImpl";
+    private static final String serverClassName = "org.apache.derby.impl.drda.NetworkServerControlImpl";
     private Class serverClass;
 	
 	private InetAddress listenAddress =null;



Mime
View raw message