db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1367985 - in /db/derby/code/trunk/java: drda/org/apache/derby/impl/drda/ drda/org/apache/derby/loc/drda/ testing/org/apache/derbyTesting/functionTests/master/ tools/org/apache/derby/impl/tools/ij/ tools/org/apache/derby/loc/
Date Wed, 01 Aug 2012 13:39:38 GMT
Author: rhillegas
Date: Wed Aug  1 13:39:38 2012
New Revision: 1367985

URL: http://svn.apache.org/viewvc?rev=1367985&view=rev
Log:
DERBY-5879: Add comments for translators to some error messages, fix some string concatenation
problems.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
    db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/messages_en.properties
    db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/encryptDatabaseTest2.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaOffline1.out
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ijException.java
    db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties

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?rev=1367985&r1=1367984&r2=1367985&view=diff
==============================================================================
--- 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
Wed Aug  1 13:39:38 2012
@@ -1298,16 +1298,24 @@ public final class NetworkServerControlI
 	private void consoleTraceMessage(int connNum, boolean on)
 		throws Exception
 	{
+        String  messageID;
+        String[]    args = null;
+        
 		if (connNum == 0)
-			consolePropertyMessage("DRDA_TraceChangeAll.I", on ? "DRDA_ON.I" : "DRDA_OFF.I");
+        {
+            if ( on ) { messageID = "DRDA_TraceChangeAllOn.I"; }
+            else { messageID = "DRDA_TraceChangeAllOff.I"; }
+        }
 		else
 		{
-            String[] args = {
-                on ? "DRDA_ON.I" : "DRDA_OFF.I",
-                Integer.toString(connNum),
-            };
-			consolePropertyMessage("DRDA_TraceChangeOne.I", args);
+            if ( on ) { messageID = "DRDA_TraceChangeOneOn.I"; }
+            else { messageID = "DRDA_TraceChangeOneOff.I"; }
+
+            args = new String[] { Integer.toString(connNum) };
+            
 		}
+        
+        consolePropertyMessage( messageID, args );
 	}
 
 	/**
@@ -1727,8 +1735,7 @@ public final class NetworkServerControlI
 					boolean log = (reader.readByte() == 1);
 					setLogConnections(log);
 					sendOK(writer);
-					consolePropertyMessage("DRDA_LogConnectionsChange.I",
-						(log ? "DRDA_ON.I" : "DRDA_OFF.I"));
+                    logConnectionsChange( log );
 					break;
 				case COMMAND_SYSINFO:
 					sendSysInfo(writer);
@@ -1778,6 +1785,20 @@ public final class NetworkServerControlI
 			currentSession = null;
 		}
 	}
+
+    /** Record a change to the connection logging mode */
+    private void    logConnectionsChange( boolean on )
+        throws Exception
+    {
+        String[]    args = null;
+        String      messageID;
+
+        if ( on ) { messageID = "DRDA_LogConnectionsChangeOn.I"; }
+        else { messageID = "DRDA_LogConnectionsChangeOff.I"; }
+
+        consolePropertyMessage( messageID, args );
+    }
+    
 	/**
 	 * Get the next session for the thread to work on
 	 * Called from DRDAConnThread after session completes or timeslice
@@ -2248,7 +2269,7 @@ public final class NetworkServerControlI
 				{
 					boolean on = isOn((String)commandArgs.get(0));
 					logConnections(on);
-					consolePropertyMessage("DRDA_LogConnectionsChange.I", on ? "DRDA_ON.I" : "DRDA_OFF.I");
+                    logConnectionsChange( on );
 					break;
 				}
 			case COMMAND_SYSINFO:

Modified: db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/messages_en.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/messages_en.properties?rev=1367985&r1=1367984&r2=1367985&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/messages_en.properties (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/messages_en.properties Wed Aug
 1 13:39:38 2012
@@ -35,11 +35,14 @@ DRDA_ShutdownError.S=Unable to shutdown 
 DRDA_BootSuccess.I=Booting database, {0}, successful.
 DRDA_DBShutdownSuccess.I=Shutting down database, {0}, successful.
 DRDA_CommandError.S=Error occurred in processing command {0}.
-DRDA_NotImplemented.S={0} is not implemented.
 DRDA_NoCommand.U=No command given.
 DRDA_UnknownArgument.U=Argument {0} is unknown.
 DRDA_UnknownCommand.U=Command {0} is unknown.
+
+# arg0 = commandArgumentValue
+# arg1 = commandArgumentName
 DRDA_InvalidValue.U=Invalid value, {0}, for {1}.
+
 DRDA_OnOffValue.U=Invalid value, {0}. Value must be ''on'' or ''off''.
 DRDA_PortNumber.I=Port number
 DRDA_Host.I=Host
@@ -51,14 +54,19 @@ DRDA_EncryptionProvider.I=Encryption pro
 DRDA_Session.I=Session
 DRDA_TraceDirectoryChange.I=Trace directory changed to {0}.
 DRDA_InvalidNoArgs.U=Invalid number of arguments for command {0}.
-DRDA_LogConnectionsChange.I=Log Connections changed to {0}.
-DRDA_TraceChangeAll.I=Trace turned {0} for all sessions.
-DRDA_TraceChangeOne.I=Trace turned {0} for session {1}.
-DRDA_ON.I=on
-DRDA_OFF.I=off
+DRDA_LogConnectionsChangeOn.I=Log Connections turned on.
+DRDA_LogConnectionsChangeOff.I=Log Connections turned off.
+DRDA_TraceChangeAllOn.I=Trace turned on for all sessions.
+DRDA_TraceChangeAllOff.I=Trace turned off for all sessions.
+DRDA_TraceChangeOneOn.I=Trace turned on for session {0}.
+DRDA_TraceChangeOneOff.I=Trace turned off for session {0}.
 DRDA_UnknownHost.S=Unable to find host: {0}.
 DRDA_UnknownHostWarning.I=Warning: UnknkownHostException: {0}.
-DRDA_NeedLocalHost.S=host: {0} is not local to the server running on {1}, so cannot be used
for NetworkServerControl commands  
+
+# arg0 = hostName
+# arg1 = socketAddress
+DRDA_NeedLocalHost.S=Host {0} is not local to the server running on {1}, so cannot be used
for NetworkServerControl commands.  
+
 DRDA_NoIO.S=Could not connect to Derby Network Server on host {0}, port {1}: {2}
 DRDA_InvalidReplyHeader1.S=Invalid reply header from network server: Length {0} too short.
 DRDA_InvalidReplyHeader2.S=Invalid reply header from network server: Invalid string {0}.
Plaintext connection attempt to an SSL enabled server?
@@ -80,7 +88,10 @@ DRDA_MissingValue.U=Missing required val
 DRDA_InvalidPropVal.S=Invalid value for property, {0}, value: {1}.
 DRDA_SessionNotFound.U=Session, {0}, not found or other error occurred starting tracing.
Check runtimeinfo for valid session numbers and derby error log for possible permission errors
or IO errors accesing the trace file.
 DRDA_ErrorStartingTracing.S=Error starting tracing. This can be caused by permission errors
or IO error accessing the trace directory. Check derby error log for details.
+
+# arg0 = maxThreadCount
 DRDA_MaxThreadsChange.I=Max threads changed to {0}.
+
 DRDA_TimeSliceChange.I=Time slice changed to {0}.
 DRDA_IOException.S=IOException: {0}.
 DRDA_UnknownProtocol=Unknown Command Protocol version: {0}.

Modified: db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties?rev=1367985&r1=1367984&r2=1367985&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties Wed Aug
 1 13:39:38 2012
@@ -49,7 +49,11 @@ SRV_Return=Return to Main Servlet Page
 SRV_SessionID=Session ID:
 SRV_TraceDir=Trace directory
 SRV_TraceDirDone=Trace directory, {0}, has been set.
+
+# arg0 = valueTypedByUser
+# arg1 = uiNameForFieldFilledByUser
 SRV_InvalidVal=Invalid value, {0}, for {1}.  
+
 SRV_NetParam=Set Network Server Parameters
 SRV_MaxThreads=Current maximum number of threads is: {0}
 SRV_TimeSlice=Current thread time slice is: {0}

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/encryptDatabaseTest2.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/encryptDatabaseTest2.out?rev=1367985&r1=1367984&r2=1367985&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/encryptDatabaseTest2.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/encryptDatabaseTest2.out
Wed Aug  1 13:39:38 2012
@@ -69,7 +69,7 @@ ij> xa_getconnection;
 ij> insert into foo values (4);
 1 row inserted/updated/deleted
 ij> xa_recover xa_startrscan;
-Recovered 1 in doubt transactions
+Recovered 1 in-doubt transactions
 Transaction 1 : (1,FILTERED,FILTERED)
 ij> xa_commit xa_2phase 1;
 ij> select * from foo;
@@ -119,7 +119,7 @@ ij> xa_getconnection;
 ij> insert into foo values (6);
 1 row inserted/updated/deleted
 ij> xa_recover xa_startrscan;
-Recovered 1 in doubt transactions
+Recovered 1 in-doubt transactions
 Transaction 1 : (3,FILTERED,FILTERED)
 ij> xa_commit xa_2phase 3;
 ij> select * from foo;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaOffline1.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaOffline1.out?rev=1367985&r1=1367984&r2=1367985&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaOffline1.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/xaOffline1.out
Wed Aug  1 13:39:38 2012
@@ -165,7 +165,7 @@ APP     |UserTransaction|ROW     |1   |X
 ij(XA)> xa_end xa_success 2;
 ij(XA)> xa_commit xa_1phase 2;
 ij(XA)> xa_recover xa_startrscan;
-Recovered 1 in doubt transactions
+Recovered 1 in-doubt transactions
 Transaction 1 : (1,FILTERED,FILTERED)
 ij(XA)> --- xa_datasource 'wombat' shutdown;
 ---------------------------------------------
@@ -198,7 +198,7 @@ USERNAME|TRANTYPE       |TYPE    |CNT |M
 NULL    |UserTransaction|TABLE   |1   |IX  |FOO         |Tablelock |GRANT|PREPARED
 NULL    |UserTransaction|ROW     |1   |X   |FOO         |(1,8)     |GRANT|PREPARED
 ij(XA)> xa_recover xa_startrscan;
-Recovered 1 in doubt transactions
+Recovered 1 in-doubt transactions
 Transaction 1 : (1,FILTERED,FILTERED)
 ij(XA)> xa_end xa_success 4;
 ij(XA)> xa_commit xa_1phase 4;
@@ -216,7 +216,7 @@ ij(XA)> select * from lock_table order b
 USERNAME|TRANTYPE       |TYPE    |CNT |MODE|TABNAME     |LOCKNAME  |STATE|STATUS  
 ----------------------------------------------------------------------------------
 ij(XA)> xa_recover xa_startrscan;
-Recovered 0 in doubt transactions
+Recovered 0 in-doubt transactions
 ij(XA)> xa_end xa_success 4;
 ij(XA)> xa_commit xa_1phase 4;
 ij(XA)> ---------------------------------------------

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ijException.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ijException.java?rev=1367985&r1=1367984&r2=1367985&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ijException.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ijException.java Wed Aug
 1 13:39:38 2012
@@ -53,7 +53,6 @@ public class ijException extends Runtime
 	private final static String NoSuchConnection = "IJ_NoConnExisWi";
 	private final static String NoSuchProtocol = "IJ_NoProtExisWi";
 	private final static String NoSuchTable = "IJ_NoSuchTable";
-	private final static String NotJDBC20 = "IJ_IsOnlySuppIn";
 	private final static String NoUsingResults = "IJ_UsinClauHadN";
 	private final static String ObjectWasNull = "IJ_UnabToEsta";
 	private final static String ResultSetGetWarningsFailed = "IJ_UnabToGetWar_19";
@@ -126,9 +125,6 @@ public class ijException extends Runtime
 	static ijException noSuchTable(String c) {
 		return new ijException(LocalizedResource.getMessage(NoSuchTable, c));
 	}
-	static public ijException notJDBC20(String operation) {
-		return new ijException(LocalizedResource.getMessage(NotJDBC20, operation));
-	}
 	static ijException noUsingResults() {
 		return new ijException(LocalizedResource.getMessage(NoUsingResults));
 	}

Modified: db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties?rev=1367985&r1=1367984&r2=1367985&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties Wed Aug 
1 13:39:38 2012
@@ -152,7 +152,10 @@ IJ_FailToDisc=Failed to disconnect
 IJ_DrivNotClasN=Driver not class name {0}
 IJ_FileNotFoun=File not found
 IJ_CannotCloseInFile=Cannot close ij input file, {0}
+
+# arg0 = an ij command keyword
 IJ_IsNotAlloOnA={0} is not allowed on a forward only cursor.
+
 IJ_GetcCallFail=getConnection call failed
 IJ_Ioex=IOException: {0}
 IJ_NeedToDiscFi=Need to disconnect first
@@ -160,7 +163,6 @@ IJ_NoAsynStatEx=No async statement exist
 IJ_NoConnExisWi=No connection exists with the name {0}
 IJ_NoProtExisWi=No protocol exists with the name {0}
 IJ_NoSuchTable=No table exists with the name {0}
-IJ_IsOnlySuppIn={0} is only supported in JDBC 2.0 and greater.
 IJ_UsinClauHadN=Using clause had no results
 IJ_UnabToEsta=Unable to establish {0}
 IJ_UnabToGetWar_19=Unable to get warnings for result set
@@ -200,7 +202,10 @@ IJ_NoSqls=(no SQLState)
 IJ_NoMess=(no message)
 IJ_Erro012=ERROR {0}: {1}{2}
 # From xaHelper.java
-IJ_Reco0InDoubT=Recovered {0} in doubt transactions
+
+# arg0 = transactionCount
+IJ_Reco0InDoubT=Recovered {0} in-doubt transactions
+
 IJ_Tran01=Transaction {0} : {1}
 IJ_IlleValu=ILLEGAL VALUE
 IJ_01SeeLog={0} : {1} (see derby.log)



Mime
View raw message