db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1643154 - in /db/derby/code/branches/10.10: ./ java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java java/drda/org/apache/derby/loc/drda/messages_en.properties
Date Fri, 05 Dec 2014 05:51:50 GMT
Author: mamta
Date: Fri Dec  5 05:51:50 2014
New Revision: 1643154

URL: http://svn.apache.org/viewvc?rev=1643154&view=rev
Log:
DERBY-6768(List the enabled protocols in derby.log for network server configuration)

backporting to 10.10


Modified:
    db/derby/code/branches/10.10/   (props changed)
    db/derby/code/branches/10.10/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
    db/derby/code/branches/10.10/java/drda/org/apache/derby/loc/drda/messages_en.properties

Propchange: db/derby/code/branches/10.10/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec  5 05:51:50 2014
@@ -2,4 +2,4 @@
 /db/derby/code/branches/10.7:1061570,1061578,1082235
 /db/derby/code/branches/10.8:1177474,1234973,1464951,1486867
 /db/derby/code/branches/10.9:1373148
-/db/derby/code/trunk:1457942,1458256,1459784,1459837,1460743,1461415,1463378,1463874,1464103,1464367,1464386,1464594,1465187,1465600,1465830,1466097,1466225,1466362,1466481,1466522,1467011,1467170,1467494,1467664,1468647,1469445,1469505,1469802,1469861,1469923,1471022,1471079,1471264,1471275,1471721,1475624,1479607,1480462,1480909,1480947,1481448,1484507,1485936,1485938,1487946,1488116,1488125,1489311,1489924,1490716,1491005,1491364,1491542,1491590,1492088,1492094,1492110,1492393,1493077,1493123,1493789,1494883,1494901,1495943,1496406,1496837,1502319,1502795,1507368,1508853,1509348,1517533,1518111,1518533,1518766,1521310,1523501,1523821,1524026,1524194,1524579,1525061,1526172,1526406,1526569,1527143,1527963,1529099,1530696,1532997,1535075,1535413,1537393-1537394,1537881,1537888,1538692,1539729,1541170,1541461,1550103,1550287,1551311,1551940,1553081,1553269,1555702,1556809,1557823,1559943,1559946,1564508-1564513,1564608,1564635,1567604,1567787,1568924,1570488,1570490,1571534,1571764,
 1571769,1573548,1573935,1574464,1574752,1574927,1574946,1575065,1575226,1575866,1577190,1578192,1579766,1581885,1582655,1582754,1582819,1585407,1586158,1589036,1592465,1592630,1592945,1593495,1594231,1594435,1594451,1594816,1595121,1596451,1599544,1600062,1600417,1600721,1600729,1600788,1601169,1602054,1602087,1602232,1602266,1603793,1605021,1610373,1615982,1616111,1616332,1616335,1616365,1620608,1627671,1627851,1628008,1629099,1629251,1636509,1636668,1636798
+/db/derby/code/trunk:1457942,1458256,1459784,1459837,1460743,1461415,1463378,1463874,1464103,1464367,1464386,1464594,1465187,1465600,1465830,1466097,1466225,1466362,1466481,1466522,1467011,1467170,1467494,1467664,1468647,1469445,1469505,1469802,1469861,1469923,1471022,1471079,1471264,1471275,1471721,1475624,1479607,1480462,1480909,1480947,1481448,1484507,1485936,1485938,1487946,1488116,1488125,1489311,1489924,1490716,1491005,1491364,1491542,1491590,1492088,1492094,1492110,1492393,1493077,1493123,1493789,1494883,1494901,1495943,1496406,1496837,1502319,1502795,1507368,1508853,1509348,1517533,1518111,1518533,1518766,1521310,1523501,1523821,1524026,1524194,1524579,1525061,1526172,1526406,1526569,1527143,1527963,1529099,1530696,1532997,1535075,1535413,1537393-1537394,1537881,1537888,1538692,1539729,1541170,1541461,1550103,1550287,1551311,1551940,1553081,1553269,1555702,1556809,1557823,1559943,1559946,1564508-1564513,1564608,1564635,1567604,1567787,1568924,1570488,1570490,1571534,1571764,
 1571769,1573548,1573935,1574464,1574752,1574927,1574946,1575065,1575226,1575866,1577190,1578192,1579766,1581885,1582655,1582754,1582819,1585407,1586158,1589036,1592465,1592630,1592945,1593495,1594231,1594435,1594451,1594816,1595121,1596451,1599544,1600062,1600417,1600721,1600729,1600788,1601169,1602054,1602087,1602232,1602266,1603793,1605021,1610373,1615982,1616111,1616332,1616335,1616365,1620608,1627671,1627851,1628008,1629099,1629251,1636509,1636668,1636798,1639804

Modified: db/derby/code/branches/10.10/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java?rev=1643154&r1=1643153&r2=1643154&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
(original)
+++ db/derby/code/branches/10.10/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Fri Dec  5 05:51:50 2014
@@ -729,6 +729,25 @@ public final class NetworkServerControlI
         }
     }
     
+    /*
+     * DERBY-6768(List the enabled protocols in derby.log for network 
+     *  server configuration)
+     * Get the enabled protocols so we can list them in the log file
+     */
+    private String getEnabledProtocols(SSLServerSocket sslServerSocket) {
+    	//Converting the String array of enabled protocols to a String
+    	StringBuffer sbf = new StringBuffer();
+        String[] enabledProtocols = sslServerSocket.getEnabledProtocols();
+        if(enabledProtocols.length > 0){
+               
+                sbf.append(enabledProtocols[0]);
+                for(int i=1; i < enabledProtocols.length; i++){
+                        sbf.append(", ").append(enabledProtocols[i]);
+                }
+               
+        }
+        return sbf.toString();
+    }
 
     /**
      * Start a network server
@@ -798,11 +817,17 @@ public final class NetworkServerControlI
             break;
         case SSL_BASIC:
             consolePropertyMessage("DRDA_SSLReady.I", new String [] 
-                {Integer.toString(portNumber), att_srvclsnm, versionString});
+                    {Integer.toString(portNumber), att_srvclsnm, versionString});
+            consolePropertyMessage("DRDA_EnabledProtocols.I", new String [] 
+                    {getEnabledProtocols((SSLServerSocket) serverSocket), 
+            		att_srvclsnm, versionString});
             break;
         case SSL_PEER_AUTHENTICATION:
             consolePropertyMessage("DRDA_SSLClientAuthReady.I", new String [] 
                 {Integer.toString(portNumber), att_srvclsnm, versionString});
+            consolePropertyMessage("DRDA_EnabledProtocols.I", new String [] 
+                    {getEnabledProtocols((SSLServerSocket) serverSocket), 
+            		att_srvclsnm, versionString});
             break;
         }
 
@@ -978,7 +1003,6 @@ public final class NetworkServerControlI
             ex.printStackTrace();
         }
     }
-    
     //Print the passed exception on the console and ignore it after that
     private void consolePrintAndIgnore(String msgProp, 
             Exception e, boolean printTimeStamp) {

Modified: db/derby/code/branches/10.10/java/drda/org/apache/derby/loc/drda/messages_en.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/drda/org/apache/derby/loc/drda/messages_en.properties?rev=1643154&r1=1643153&r2=1643154&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/drda/org/apache/derby/loc/drda/messages_en.properties
(original)
+++ db/derby/code/branches/10.10/java/drda/org/apache/derby/loc/drda/messages_en.properties
Fri Dec  5 05:51:50 2014
@@ -25,6 +25,7 @@ DRDA_NoInputStream.S=Could not get input
 DRDA_Ready.I={1} Network Server - {2} started and ready to accept connections on port {0}
 DRDA_SSLReady.I={1} Network Server - {2} started and ready to accept SSL connections on port
{0}
 DRDA_SSLClientAuthReady.I={1} Network Server - {2} started and ready to accept SSL connections
with client authentication on port {0} 
+DRDA_EnabledProtocols.I={1} Network Server - {2} Enabled Protocols are {0}
 DRDA_UnableToAccept.S=Unable to accept connections.
 DRDA_ConnNumber.I=Connection number: {0}.
 DRDA_ClientSocketError.S=Error on client socket:\n {0}



Mime
View raw message