You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2016/05/18 15:36:41 UTC

svn commit: r1744426 - in /qpid/java/branches/6.0.x: ./ broker-core/src/main/java/org/apache/qpid/server/logging/messages/ broker-core/src/main/java/org/apache/qpid/server/model/ broker-core/src/main/java/org/apache/qpid/server/model/adapter/ broker-co...

Author: orudyy
Date: Wed May 18 15:36:41 2016
New Revision: 1744426

URL: http://svn.apache.org/viewvc?rev=1744426&view=rev
Log:
QPID-6096 : Add more obvious logging on failure to bind ports / other broker child failures

merged from trunk using
svn merge -c 1744123  ^/qpid/java/trunk

Added:
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/transport/PortBindFailureException.java
      - copied unchanged from r1744123, qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/PortBindFailureException.java
Modified:
    qpid/java/branches/6.0.x/   (props changed)
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/BrokerMessages.java
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Broker_logmessages.properties
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/PortMessages.java
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Port_logmessages.properties
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java
    qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingNetworkTransport.java
    qpid/java/branches/6.0.x/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java

Propchange: qpid/java/branches/6.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 18 15:36:41 2016
@@ -9,5 +9,5 @@
 /qpid/branches/java-broker-vhost-refactor/java:1493674-1494547
 /qpid/branches/java-network-refactor/qpid/java:805429-821809
 /qpid/branches/qpid-2935/qpid/java:1061302-1072333
-/qpid/java/trunk:1715445-1715447,1715586,1715940,1716086-1716087,1716127-1716128,1716141,1716153,1716155,1716194,1716204,1716209,1716227,1716277,1716357,1716368,1716370,1716374,1716432,1716444-1716445,1716455,1716461,1716474,1716489,1716497,1716515,1716555,1716602,1716606-1716610,1716619,1716636,1717269,1717299,1717401,1717446,1717449,1717626,1717691,1717735,1717780,1718744,1718889,1718893,1718918,1718922,1719026,1719028,1719033,1719037,1719047,1719051,1720340,1720664,1721151,1721198,1722019-1722020,1722246,1722339,1722416,1722674,1722678,1722683,1722711,1723064,1723194,1723563,1724216,1724251,1724257,1724292,1724375,1724397,1724432,1724582,1724603,1724780,1724843-1724844,1725295,1725569,1725760,1726176,1726244-1726246,1726249,1726358,1726436,1726449,1726456,1726646,1726653,1726755,1726778,1727532,1727555,1727608,1727951,1727954,1728089,1728167,1728302,1728497,1728501,1728524,1728639,1728651,1728772,1729215,1729297,1729347,1729356,1729406,1729408,1729412,1729515,1729638,1729656-1729
 657,1729783,1729828,1729832,1729841,1729851,1729886,1729904,1729973,1730019,1730025,1730052,1730072,1730088,1730494,1730499,1730547,1730559,1730567,1730578,1730585,1730651,1730697,1730712-1730713,1730805,1731029,1731110,1731210,1731225,1731444,1731551,1731612,1732184,1732452,1732461,1732525,1732812,1733467,1734452,1736478,1736751,1736838,1737804,1737835,1737853,1737984,1737992,1738119,1738135,1738231,1738271,1738607,1738610,1738731,1738914,1741702,1742257,1742284,1742544,1742900,1742926,1743161,1743228,1743383,1744012-1744013,1744046
+/qpid/java/trunk:1715445-1715447,1715586,1715940,1716086-1716087,1716127-1716128,1716141,1716153,1716155,1716194,1716204,1716209,1716227,1716277,1716357,1716368,1716370,1716374,1716432,1716444-1716445,1716455,1716461,1716474,1716489,1716497,1716515,1716555,1716602,1716606-1716610,1716619,1716636,1717269,1717299,1717401,1717446,1717449,1717626,1717691,1717735,1717780,1718744,1718889,1718893,1718918,1718922,1719026,1719028,1719033,1719037,1719047,1719051,1720340,1720664,1721151,1721198,1722019-1722020,1722246,1722339,1722416,1722674,1722678,1722683,1722711,1723064,1723194,1723563,1724216,1724251,1724257,1724292,1724375,1724397,1724432,1724582,1724603,1724780,1724843-1724844,1725295,1725569,1725760,1726176,1726244-1726246,1726249,1726358,1726436,1726449,1726456,1726646,1726653,1726755,1726778,1727532,1727555,1727608,1727951,1727954,1728089,1728167,1728302,1728497,1728501,1728524,1728639,1728651,1728772,1729215,1729297,1729347,1729356,1729406,1729408,1729412,1729515,1729638,1729656-1729
 657,1729783,1729828,1729832,1729841,1729851,1729886,1729904,1729973,1730019,1730025,1730052,1730072,1730088,1730494,1730499,1730547,1730559,1730567,1730578,1730585,1730651,1730697,1730712-1730713,1730805,1731029,1731110,1731210,1731225,1731444,1731551,1731612,1732184,1732452,1732461,1732525,1732812,1733467,1734452,1736478,1736751,1736838,1737804,1737835,1737853,1737984,1737992,1738119,1738135,1738231,1738271,1738607,1738610,1738731,1738914,1741702,1742257,1742284,1742544,1742900,1742926,1743161,1743228,1743383,1744012-1744013,1744046,1744123
 /qpid/trunk/qpid:796646-796653

Modified: qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/BrokerMessages.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/BrokerMessages.java?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/BrokerMessages.java (original)
+++ qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/BrokerMessages.java Wed May 18 15:36:41 2016
@@ -45,63 +45,60 @@ public class BrokerMessages
     private static Locale _currentLocale = BrokerProperties.getLocale();
 
     public static final String BROKER_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker";
-    public static final String CONFIG_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.config";
-    public static final String STATS_DATA_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.stats_data";
-    public static final String STOPPED_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.stopped";
-    public static final String STATS_MSGS_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.stats_msgs";
+    public static final String READY_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.ready";
+    public static final String FAILED_CHILDREN_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.failed_children";
+    public static final String FLOW_TO_DISK_ACTIVE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.flow_to_disk_active";
     public static final String LISTENING_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.listening";
+    public static final String STARTUP_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.startup";
+    public static final String MANAGEMENT_MODE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.management_mode";
     public static final String FLOW_TO_DISK_INACTIVE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.flow_to_disk_inactive";
-    public static final String FLOW_TO_DISK_ACTIVE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.flow_to_disk_active";
-    public static final String MAX_MEMORY_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.max_memory";
+    public static final String STATS_MSGS_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.stats_msgs";
     public static final String PLATFORM_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.platform";
-    public static final String OPERATION_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.operation";
-    public static final String PROCESS_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.process";
+    public static final String CONFIG_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.config";
     public static final String SHUTTING_DOWN_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.shutting_down";
-    public static final String MANAGEMENT_MODE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.management_mode";
-    public static final String STARTUP_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.startup";
+    public static final String STATS_DATA_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.stats_data";
     public static final String FATAL_ERROR_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.fatal_error";
-    public static final String READY_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.ready";
+    public static final String OPERATION_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.operation";
+    public static final String STOPPED_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.stopped";
+    public static final String PROCESS_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.process";
+    public static final String MAX_MEMORY_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "broker.max_memory";
 
     static
     {
         LoggerFactory.getLogger(BROKER_LOG_HIERARCHY);
-        LoggerFactory.getLogger(CONFIG_LOG_HIERARCHY);
-        LoggerFactory.getLogger(STATS_DATA_LOG_HIERARCHY);
-        LoggerFactory.getLogger(STOPPED_LOG_HIERARCHY);
-        LoggerFactory.getLogger(STATS_MSGS_LOG_HIERARCHY);
+        LoggerFactory.getLogger(READY_LOG_HIERARCHY);
+        LoggerFactory.getLogger(FAILED_CHILDREN_LOG_HIERARCHY);
+        LoggerFactory.getLogger(FLOW_TO_DISK_ACTIVE_LOG_HIERARCHY);
         LoggerFactory.getLogger(LISTENING_LOG_HIERARCHY);
+        LoggerFactory.getLogger(STARTUP_LOG_HIERARCHY);
+        LoggerFactory.getLogger(MANAGEMENT_MODE_LOG_HIERARCHY);
         LoggerFactory.getLogger(FLOW_TO_DISK_INACTIVE_LOG_HIERARCHY);
-        LoggerFactory.getLogger(FLOW_TO_DISK_ACTIVE_LOG_HIERARCHY);
-        LoggerFactory.getLogger(MAX_MEMORY_LOG_HIERARCHY);
+        LoggerFactory.getLogger(STATS_MSGS_LOG_HIERARCHY);
         LoggerFactory.getLogger(PLATFORM_LOG_HIERARCHY);
-        LoggerFactory.getLogger(OPERATION_LOG_HIERARCHY);
-        LoggerFactory.getLogger(PROCESS_LOG_HIERARCHY);
+        LoggerFactory.getLogger(CONFIG_LOG_HIERARCHY);
         LoggerFactory.getLogger(SHUTTING_DOWN_LOG_HIERARCHY);
-        LoggerFactory.getLogger(MANAGEMENT_MODE_LOG_HIERARCHY);
-        LoggerFactory.getLogger(STARTUP_LOG_HIERARCHY);
+        LoggerFactory.getLogger(STATS_DATA_LOG_HIERARCHY);
         LoggerFactory.getLogger(FATAL_ERROR_LOG_HIERARCHY);
-        LoggerFactory.getLogger(READY_LOG_HIERARCHY);
+        LoggerFactory.getLogger(OPERATION_LOG_HIERARCHY);
+        LoggerFactory.getLogger(STOPPED_LOG_HIERARCHY);
+        LoggerFactory.getLogger(PROCESS_LOG_HIERARCHY);
+        LoggerFactory.getLogger(MAX_MEMORY_LOG_HIERARCHY);
 
         _messages = ResourceBundle.getBundle("org.apache.qpid.server.logging.messages.Broker_logmessages", _currentLocale);
     }
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1006 : Using configuration : {0}</pre>
+     * <pre>BRK-1004 : Qpid Broker Ready</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage CONFIG(String param1)
+    public static LogMessage READY()
     {
-        String rawMessage = _messages.getString("CONFIG");
-
-        final Object[] messageArguments = {param1};
-        // Create a new MessageFormat to ensure thread safety.
-        // Sharing a MessageFormat and using applyPattern is not thread safe
-        MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
+        String rawMessage = _messages.getString("READY");
 
-        final String message = formatter.format(messageArguments);
+        final String message = rawMessage;
 
         return new LogMessage()
         {
@@ -112,7 +109,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return CONFIG_LOG_HIERARCHY;
+                return READY_LOG_HIERARCHY;
             }
 
             @Override
@@ -145,16 +142,16 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1008 : {0,choice,0#delivered|1#received} : {1,number,#.###} kB/s peak : {2,number,#} bytes total</pre>
+     * <pre>BRK-1019 : WARNING - some services were unable to start. The following components are in the ERRORed state {0}</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage STATS_DATA(Number param1, Number param2, Number param3)
+    public static LogMessage FAILED_CHILDREN(String param1)
     {
-        String rawMessage = _messages.getString("STATS_DATA");
+        String rawMessage = _messages.getString("FAILED_CHILDREN");
 
-        final Object[] messageArguments = {param1, param2, param3};
+        final Object[] messageArguments = {param1};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -170,7 +167,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return STATS_DATA_LOG_HIERARCHY;
+                return FAILED_CHILDREN_LOG_HIERARCHY;
             }
 
             @Override
@@ -203,16 +200,21 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1005 : Stopped</pre>
+     * <pre>BRK-1014 : Message flow to disk active :  Message memory use {0,number,#}KB exceeds threshold {1,number,#.##}KB</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage STOPPED()
+    public static LogMessage FLOW_TO_DISK_ACTIVE(Number param1, Number param2)
     {
-        String rawMessage = _messages.getString("STOPPED");
+        String rawMessage = _messages.getString("FLOW_TO_DISK_ACTIVE");
 
-        final String message = rawMessage;
+        final Object[] messageArguments = {param1, param2};
+        // Create a new MessageFormat to ensure thread safety.
+        // Sharing a MessageFormat and using applyPattern is not thread safe
+        MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
+
+        final String message = formatter.format(messageArguments);
 
         return new LogMessage()
         {
@@ -223,7 +225,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return STOPPED_LOG_HIERARCHY;
+                return FLOW_TO_DISK_ACTIVE_LOG_HIERARCHY;
             }
 
             @Override
@@ -256,16 +258,16 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1009 : {0,choice,0#delivered|1#received} : {1,number,#.###} msg/s peak : {2,number,#} msgs total</pre>
+     * <pre>BRK-1002 : Starting : Listening on {0} port {1,number,#}</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage STATS_MSGS(Number param1, Number param2, Number param3)
+    public static LogMessage LISTENING(String param1, Number param2)
     {
-        String rawMessage = _messages.getString("STATS_MSGS");
+        String rawMessage = _messages.getString("LISTENING");
 
-        final Object[] messageArguments = {param1, param2, param3};
+        final Object[] messageArguments = {param1, param2};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -281,7 +283,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return STATS_MSGS_LOG_HIERARCHY;
+                return LISTENING_LOG_HIERARCHY;
             }
 
             @Override
@@ -314,14 +316,14 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1002 : Starting : Listening on {0} port {1,number,#}</pre>
+     * <pre>BRK-1001 : Startup : Version: {0} Build: {1}</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage LISTENING(String param1, Number param2)
+    public static LogMessage STARTUP(String param1, String param2)
     {
-        String rawMessage = _messages.getString("LISTENING");
+        String rawMessage = _messages.getString("STARTUP");
 
         final Object[] messageArguments = {param1, param2};
         // Create a new MessageFormat to ensure thread safety.
@@ -339,7 +341,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return LISTENING_LOG_HIERARCHY;
+                return STARTUP_LOG_HIERARCHY;
             }
 
             @Override
@@ -372,14 +374,14 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1015 : Message flow to disk inactive : Message memory use {0,number,#}KB within threshold {1,number,#.##}KB</pre>
+     * <pre>BRK-1012 : Management Mode : User Details : {0} / {1}</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage FLOW_TO_DISK_INACTIVE(Number param1, Number param2)
+    public static LogMessage MANAGEMENT_MODE(String param1, String param2)
     {
-        String rawMessage = _messages.getString("FLOW_TO_DISK_INACTIVE");
+        String rawMessage = _messages.getString("MANAGEMENT_MODE");
 
         final Object[] messageArguments = {param1, param2};
         // Create a new MessageFormat to ensure thread safety.
@@ -397,7 +399,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return FLOW_TO_DISK_INACTIVE_LOG_HIERARCHY;
+                return MANAGEMENT_MODE_LOG_HIERARCHY;
             }
 
             @Override
@@ -430,14 +432,14 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1014 : Message flow to disk active :  Message memory use {0,number,#}KB exceeds threshold {1,number,#.##}KB</pre>
+     * <pre>BRK-1015 : Message flow to disk inactive : Message memory use {0,number,#}KB within threshold {1,number,#.##}KB</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage FLOW_TO_DISK_ACTIVE(Number param1, Number param2)
+    public static LogMessage FLOW_TO_DISK_INACTIVE(Number param1, Number param2)
     {
-        String rawMessage = _messages.getString("FLOW_TO_DISK_ACTIVE");
+        String rawMessage = _messages.getString("FLOW_TO_DISK_INACTIVE");
 
         final Object[] messageArguments = {param1, param2};
         // Create a new MessageFormat to ensure thread safety.
@@ -455,7 +457,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return FLOW_TO_DISK_ACTIVE_LOG_HIERARCHY;
+                return FLOW_TO_DISK_INACTIVE_LOG_HIERARCHY;
             }
 
             @Override
@@ -488,16 +490,16 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1011 : Maximum Memory : Heap : {0,number} bytes Direct : {1,number} bytes</pre>
+     * <pre>BRK-1009 : {0,choice,0#delivered|1#received} : {1,number,#.###} msg/s peak : {2,number,#} msgs total</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage MAX_MEMORY(Number param1, Number param2)
+    public static LogMessage STATS_MSGS(Number param1, Number param2, Number param3)
     {
-        String rawMessage = _messages.getString("MAX_MEMORY");
+        String rawMessage = _messages.getString("STATS_MSGS");
 
-        final Object[] messageArguments = {param1, param2};
+        final Object[] messageArguments = {param1, param2, param3};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -513,7 +515,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return MAX_MEMORY_LOG_HIERARCHY;
+                return STATS_MSGS_LOG_HIERARCHY;
             }
 
             @Override
@@ -604,14 +606,14 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1018 : Operation : {0}</pre>
+     * <pre>BRK-1006 : Using configuration : {0}</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage OPERATION(String param1)
+    public static LogMessage CONFIG(String param1)
     {
-        String rawMessage = _messages.getString("OPERATION");
+        String rawMessage = _messages.getString("CONFIG");
 
         final Object[] messageArguments = {param1};
         // Create a new MessageFormat to ensure thread safety.
@@ -629,7 +631,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return OPERATION_LOG_HIERARCHY;
+                return CONFIG_LOG_HIERARCHY;
             }
 
             @Override
@@ -662,16 +664,16 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1017 : Process : PID : {0}</pre>
+     * <pre>BRK-1003 : Shutting down : {0} port {1,number,#}</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage PROCESS(String param1)
+    public static LogMessage SHUTTING_DOWN(String param1, Number param2)
     {
-        String rawMessage = _messages.getString("PROCESS");
+        String rawMessage = _messages.getString("SHUTTING_DOWN");
 
-        final Object[] messageArguments = {param1};
+        final Object[] messageArguments = {param1, param2};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -687,7 +689,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return PROCESS_LOG_HIERARCHY;
+                return SHUTTING_DOWN_LOG_HIERARCHY;
             }
 
             @Override
@@ -720,16 +722,16 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1003 : Shutting down : {0} port {1,number,#}</pre>
+     * <pre>BRK-1008 : {0,choice,0#delivered|1#received} : {1,number,#.###} kB/s peak : {2,number,#} bytes total</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage SHUTTING_DOWN(String param1, Number param2)
+    public static LogMessage STATS_DATA(Number param1, Number param2, Number param3)
     {
-        String rawMessage = _messages.getString("SHUTTING_DOWN");
+        String rawMessage = _messages.getString("STATS_DATA");
 
-        final Object[] messageArguments = {param1, param2};
+        final Object[] messageArguments = {param1, param2, param3};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -745,7 +747,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return SHUTTING_DOWN_LOG_HIERARCHY;
+                return STATS_DATA_LOG_HIERARCHY;
             }
 
             @Override
@@ -778,16 +780,16 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1012 : Management Mode : User Details : {0} / {1}</pre>
+     * <pre>BRK-1016 : Fatal error : {0} : See log file for more information</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage MANAGEMENT_MODE(String param1, String param2)
+    public static LogMessage FATAL_ERROR(String param1)
     {
-        String rawMessage = _messages.getString("MANAGEMENT_MODE");
+        String rawMessage = _messages.getString("FATAL_ERROR");
 
-        final Object[] messageArguments = {param1, param2};
+        final Object[] messageArguments = {param1};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -803,7 +805,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return MANAGEMENT_MODE_LOG_HIERARCHY;
+                return FATAL_ERROR_LOG_HIERARCHY;
             }
 
             @Override
@@ -836,16 +838,16 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1001 : Startup : Version: {0} Build: {1}</pre>
+     * <pre>BRK-1018 : Operation : {0}</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage STARTUP(String param1, String param2)
+    public static LogMessage OPERATION(String param1)
     {
-        String rawMessage = _messages.getString("STARTUP");
+        String rawMessage = _messages.getString("OPERATION");
 
-        final Object[] messageArguments = {param1, param2};
+        final Object[] messageArguments = {param1};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -861,7 +863,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return STARTUP_LOG_HIERARCHY;
+                return OPERATION_LOG_HIERARCHY;
             }
 
             @Override
@@ -894,14 +896,67 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1016 : Fatal error : {0} : See log file for more information</pre>
+     * <pre>BRK-1005 : Stopped</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage FATAL_ERROR(String param1)
+    public static LogMessage STOPPED()
     {
-        String rawMessage = _messages.getString("FATAL_ERROR");
+        String rawMessage = _messages.getString("STOPPED");
+
+        final String message = rawMessage;
+
+        return new LogMessage()
+        {
+            public String toString()
+            {
+                return message;
+            }
+
+            public String getLogHierarchy()
+            {
+                return STOPPED_LOG_HIERARCHY;
+            }
+
+            @Override
+            public boolean equals(final Object o)
+            {
+                if (this == o)
+                {
+                    return true;
+                }
+                if (o == null || getClass() != o.getClass())
+                {
+                    return false;
+                }
+
+                final LogMessage that = (LogMessage) o;
+
+                return getLogHierarchy().equals(that.getLogHierarchy()) && toString().equals(that.toString());
+
+            }
+
+            @Override
+            public int hashCode()
+            {
+                int result = toString().hashCode();
+                result = 31 * result + getLogHierarchy().hashCode();
+                return result;
+            }
+        };
+    }
+
+    /**
+     * Log a Broker message of the Format:
+     * <pre>BRK-1017 : Process : PID : {0}</pre>
+     * Optional values are contained in [square brackets] and are numbered
+     * sequentially in the method call.
+     *
+     */
+    public static LogMessage PROCESS(String param1)
+    {
+        String rawMessage = _messages.getString("PROCESS");
 
         final Object[] messageArguments = {param1};
         // Create a new MessageFormat to ensure thread safety.
@@ -919,7 +974,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return FATAL_ERROR_LOG_HIERARCHY;
+                return PROCESS_LOG_HIERARCHY;
             }
 
             @Override
@@ -952,16 +1007,21 @@ public class BrokerMessages
 
     /**
      * Log a Broker message of the Format:
-     * <pre>BRK-1004 : Qpid Broker Ready</pre>
+     * <pre>BRK-1011 : Maximum Memory : Heap : {0,number} bytes Direct : {1,number} bytes</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage READY()
+    public static LogMessage MAX_MEMORY(Number param1, Number param2)
     {
-        String rawMessage = _messages.getString("READY");
+        String rawMessage = _messages.getString("MAX_MEMORY");
 
-        final String message = rawMessage;
+        final Object[] messageArguments = {param1, param2};
+        // Create a new MessageFormat to ensure thread safety.
+        // Sharing a MessageFormat and using applyPattern is not thread safe
+        MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
+
+        final String message = formatter.format(messageArguments);
 
         return new LogMessage()
         {
@@ -972,7 +1032,7 @@ public class BrokerMessages
 
             public String getLogHierarchy()
             {
-                return READY_LOG_HIERARCHY;
+                return MAX_MEMORY_LOG_HIERARCHY;
             }
 
             @Override

Modified: qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Broker_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Broker_logmessages.properties?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Broker_logmessages.properties (original)
+++ qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Broker_logmessages.properties Wed May 18 15:36:41 2016
@@ -61,3 +61,5 @@ PROCESS = BRK-1017 : Process : PID : {0}
 
 # 0 - operation name
 OPERATION = BRK-1018 : Operation : {0}
+
+FAILED_CHILDREN = BRK-1019 : WARNING - some services were unable to start. The following components are in the ERRORed state {0}

Modified: qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/PortMessages.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/PortMessages.java?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/PortMessages.java (original)
+++ qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/PortMessages.java Wed May 18 15:36:41 2016
@@ -45,42 +45,49 @@ public class PortMessages
     private static Locale _currentLocale = BrokerProperties.getLocale();
 
     public static final String PORT_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port";
-    public static final String OPEN_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.open";
-    public static final String CREATE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.create";
     public static final String DELETE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.delete";
-    public static final String CLOSE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.close";
+    public static final String CREATE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.create";
+    public static final String UNSUPPORTED_PROTOCOL_HEADER_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.unsupported_protocol_header";
     public static final String CONNECTION_REJECTED_CLOSED_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.connection_rejected_closed";
-    public static final String CONNECTION_REJECTED_TOO_MANY_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.connection_rejected_too_many";
     public static final String CONNECTION_COUNT_WARN_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.connection_count_warn";
-    public static final String UNSUPPORTED_PROTOCOL_HEADER_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.unsupported_protocol_header";
+    public static final String BIND_FAILED_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.bind_failed";
+    public static final String CLOSE_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.close";
+    public static final String CONNECTION_REJECTED_TOO_MANY_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.connection_rejected_too_many";
+    public static final String OPEN_LOG_HIERARCHY = DEFAULT_LOG_HIERARCHY_PREFIX + "port.open";
 
     static
     {
         LoggerFactory.getLogger(PORT_LOG_HIERARCHY);
-        LoggerFactory.getLogger(OPEN_LOG_HIERARCHY);
-        LoggerFactory.getLogger(CREATE_LOG_HIERARCHY);
         LoggerFactory.getLogger(DELETE_LOG_HIERARCHY);
-        LoggerFactory.getLogger(CLOSE_LOG_HIERARCHY);
-        LoggerFactory.getLogger(CONNECTION_COUNT_WARN_LOG_HIERARCHY);
+        LoggerFactory.getLogger(CREATE_LOG_HIERARCHY);
+        LoggerFactory.getLogger(UNSUPPORTED_PROTOCOL_HEADER_LOG_HIERARCHY);
         LoggerFactory.getLogger(CONNECTION_REJECTED_CLOSED_LOG_HIERARCHY);
         LoggerFactory.getLogger(CONNECTION_COUNT_WARN_LOG_HIERARCHY);
-        LoggerFactory.getLogger(UNSUPPORTED_PROTOCOL_HEADER_LOG_HIERARCHY);
+        LoggerFactory.getLogger(BIND_FAILED_LOG_HIERARCHY);
+        LoggerFactory.getLogger(CLOSE_LOG_HIERARCHY);
+        LoggerFactory.getLogger(CONNECTION_REJECTED_TOO_MANY_LOG_HIERARCHY);
+        LoggerFactory.getLogger(OPEN_LOG_HIERARCHY);
 
         _messages = ResourceBundle.getBundle("org.apache.qpid.server.logging.messages.Port_logmessages", _currentLocale);
     }
 
     /**
      * Log a Port message of the Format:
-     * <pre>PRT-1002 : Open</pre>
+     * <pre>PRT-1006 : Delete {0} Port "{1}"</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage OPEN()
+    public static LogMessage DELETE(String param1, String param2)
     {
-        String rawMessage = _messages.getString("OPEN");
+        String rawMessage = _messages.getString("DELETE");
 
-        final String message = rawMessage;
+        final Object[] messageArguments = {param1, param2};
+        // Create a new MessageFormat to ensure thread safety.
+        // Sharing a MessageFormat and using applyPattern is not thread safe
+        MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
+
+        final String message = formatter.format(messageArguments);
 
         return new LogMessage()
         {
@@ -91,7 +98,7 @@ public class PortMessages
 
             public String getLogHierarchy()
             {
-                return OPEN_LOG_HIERARCHY;
+                return DELETE_LOG_HIERARCHY;
             }
 
             @Override
@@ -182,16 +189,16 @@ public class PortMessages
 
     /**
      * Log a Port message of the Format:
-     * <pre>PRT-1006 : Delete {0} Port "{1}"</pre>
+     * <pre>PRT-1007 : Unsupported protocol header received, replying with {0}</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage DELETE(String param1, String param2)
+    public static LogMessage UNSUPPORTED_PROTOCOL_HEADER(String param1)
     {
-        String rawMessage = _messages.getString("DELETE");
+        String rawMessage = _messages.getString("UNSUPPORTED_PROTOCOL_HEADER");
 
-        final Object[] messageArguments = {param1, param2};
+        final Object[] messageArguments = {param1};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -207,7 +214,7 @@ public class PortMessages
 
             public String getLogHierarchy()
             {
-                return DELETE_LOG_HIERARCHY;
+                return UNSUPPORTED_PROTOCOL_HEADER_LOG_HIERARCHY;
             }
 
             @Override
@@ -240,16 +247,21 @@ public class PortMessages
 
     /**
      * Log a Port message of the Format:
-     * <pre>PRT-1003 : Close</pre>
+     * <pre>PRT-1008 : Connection from {0} rejected. Port closed.</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage CLOSE()
+    public static LogMessage CONNECTION_REJECTED_CLOSED(String param1)
     {
-        String rawMessage = _messages.getString("CLOSE");
+        String rawMessage = _messages.getString("CONNECTION_REJECTED_CLOSED");
 
-        final String message = rawMessage;
+        final Object[] messageArguments = {param1};
+        // Create a new MessageFormat to ensure thread safety.
+        // Sharing a MessageFormat and using applyPattern is not thread safe
+        MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
+
+        final String message = formatter.format(messageArguments);
 
         return new LogMessage()
         {
@@ -260,7 +272,7 @@ public class PortMessages
 
             public String getLogHierarchy()
             {
-                return CLOSE_LOG_HIERARCHY;
+                return CONNECTION_REJECTED_CLOSED_LOG_HIERARCHY;
             }
 
             @Override
@@ -293,16 +305,16 @@ public class PortMessages
 
     /**
      * Log a Port message of the Format:
-     * <pre>PRT-1005 : Connection from {0} rejected. Maximum connection count ({1, number}) for this port already reached.</pre>
+     * <pre>PRT-1004 : Connection count {0,number} within {1, number} % of maximum {2,number}</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage CONNECTION_REJECTED_TOO_MANY(String param1, Number param2)
+    public static LogMessage CONNECTION_COUNT_WARN(Number param1, Number param2, Number param3)
     {
-        String rawMessage = _messages.getString("CONNECTION_REJECTED_TOO_MANY");
+        String rawMessage = _messages.getString("CONNECTION_COUNT_WARN");
 
-        final Object[] messageArguments = {param1, param2};
+        final Object[] messageArguments = {param1, param2, param3};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -318,7 +330,7 @@ public class PortMessages
 
             public String getLogHierarchy()
             {
-                return CONNECTION_REJECTED_TOO_MANY_LOG_HIERARCHY;
+                return CONNECTION_COUNT_WARN_LOG_HIERARCHY;
             }
 
             @Override
@@ -351,16 +363,16 @@ public class PortMessages
 
     /**
      * Log a Port message of the Format:
-     * <pre>PRT-1008 : Connection from {0} rejected. Port closed.</pre>
+     * <pre>PRT-1009 : FAILED to bind {0} service to {1,number,#} - port in use</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage CONNECTION_REJECTED_CLOSED(String param1)
+    public static LogMessage BIND_FAILED(String param1, Number param2)
     {
-        String rawMessage = _messages.getString("CONNECTION_REJECTED_CLOSED");
+        String rawMessage = _messages.getString("BIND_FAILED");
 
-        final Object[] messageArguments = {param1};
+        final Object[] messageArguments = {param1, param2};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -376,7 +388,7 @@ public class PortMessages
 
             public String getLogHierarchy()
             {
-                return CONNECTION_REJECTED_CLOSED_LOG_HIERARCHY;
+                return BIND_FAILED_LOG_HIERARCHY;
             }
 
             @Override
@@ -409,21 +421,16 @@ public class PortMessages
 
     /**
      * Log a Port message of the Format:
-     * <pre>PRT-1004 : Connection count {0,number} within {1, number} % of maximum {2,number}</pre>
+     * <pre>PRT-1003 : Close</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage CONNECTION_COUNT_WARN(Number param1, Number param2, Number param3)
+    public static LogMessage CLOSE()
     {
-        String rawMessage = _messages.getString("CONNECTION_COUNT_WARN");
-
-        final Object[] messageArguments = {param1, param2, param3};
-        // Create a new MessageFormat to ensure thread safety.
-        // Sharing a MessageFormat and using applyPattern is not thread safe
-        MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
+        String rawMessage = _messages.getString("CLOSE");
 
-        final String message = formatter.format(messageArguments);
+        final String message = rawMessage;
 
         return new LogMessage()
         {
@@ -434,7 +441,7 @@ public class PortMessages
 
             public String getLogHierarchy()
             {
-                return CONNECTION_COUNT_WARN_LOG_HIERARCHY;
+                return CLOSE_LOG_HIERARCHY;
             }
 
             @Override
@@ -467,16 +474,16 @@ public class PortMessages
 
     /**
      * Log a Port message of the Format:
-     * <pre>PRT-1007 : Unsupported protocol header received, replying with {0}</pre>
+     * <pre>PRT-1005 : Connection from {0} rejected. Maximum connection count ({1, number}) for this port already reached.</pre>
      * Optional values are contained in [square brackets] and are numbered
      * sequentially in the method call.
      *
      */
-    public static LogMessage UNSUPPORTED_PROTOCOL_HEADER(String param1)
+    public static LogMessage CONNECTION_REJECTED_TOO_MANY(String param1, Number param2)
     {
-        String rawMessage = _messages.getString("UNSUPPORTED_PROTOCOL_HEADER");
+        String rawMessage = _messages.getString("CONNECTION_REJECTED_TOO_MANY");
 
-        final Object[] messageArguments = {param1};
+        final Object[] messageArguments = {param1, param2};
         // Create a new MessageFormat to ensure thread safety.
         // Sharing a MessageFormat and using applyPattern is not thread safe
         MessageFormat formatter = new MessageFormat(rawMessage, _currentLocale);
@@ -492,7 +499,7 @@ public class PortMessages
 
             public String getLogHierarchy()
             {
-                return UNSUPPORTED_PROTOCOL_HEADER_LOG_HIERARCHY;
+                return CONNECTION_REJECTED_TOO_MANY_LOG_HIERARCHY;
             }
 
             @Override
@@ -523,6 +530,60 @@ public class PortMessages
         };
     }
 
+    /**
+     * Log a Port message of the Format:
+     * <pre>PRT-1002 : Open</pre>
+     * Optional values are contained in [square brackets] and are numbered
+     * sequentially in the method call.
+     *
+     */
+    public static LogMessage OPEN()
+    {
+        String rawMessage = _messages.getString("OPEN");
+
+        final String message = rawMessage;
+
+        return new LogMessage()
+        {
+            public String toString()
+            {
+                return message;
+            }
+
+            public String getLogHierarchy()
+            {
+                return OPEN_LOG_HIERARCHY;
+            }
+
+            @Override
+            public boolean equals(final Object o)
+            {
+                if (this == o)
+                {
+                    return true;
+                }
+                if (o == null || getClass() != o.getClass())
+                {
+                    return false;
+                }
+
+                final LogMessage that = (LogMessage) o;
+
+                return getLogHierarchy().equals(that.getLogHierarchy()) && toString().equals(that.toString());
+
+            }
+
+            @Override
+            public int hashCode()
+            {
+                int result = toString().hashCode();
+                result = 31 * result + getLogHierarchy().hashCode();
+                return result;
+            }
+        };
+    }
+
+
     private PortMessages()
     {
     }

Modified: qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Port_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Port_logmessages.properties?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Port_logmessages.properties (original)
+++ qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/logging/messages/Port_logmessages.properties Wed May 18 15:36:41 2016
@@ -28,3 +28,5 @@ DELETE = PRT-1006 : Delete {0} Port "{1}
 
 UNSUPPORTED_PROTOCOL_HEADER = PRT-1007 : Unsupported protocol header received, replying with {0}
 CONNECTION_REJECTED_CLOSED = PRT-1008 : Connection from {0} rejected. Port closed.
+BIND_FAILED = PRT-1009 : FAILED to bind {0} service to {1,number,#} - port in use
+

Modified: qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java (original)
+++ qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java Wed May 18 15:36:41 2016
@@ -1744,7 +1744,7 @@ public abstract class AbstractConfigured
     @Override
     public String toString()
     {
-        return getClass().getSimpleName() + " [id=" + _id + ", name=" + getName() + "]";
+        return getCategoryClass().getSimpleName() + "[id=" + _id + ", name=" + getName() + ", type=" + getType() + "]";
     }
 
     public final ConfiguredObjectRecord asObjectRecord()

Modified: qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java (original)
+++ qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java Wed May 18 15:36:41 2016
@@ -341,6 +341,7 @@ public class BrokerAdapter extends Abstr
     {
         boolean hasBrokerAnyErroredChildren = false;
 
+        List<ConfiguredObject<?>> failedChildren = new ArrayList<>();
         for (final Class<? extends ConfiguredObject> childClass : getModel().getChildTypes(getCategoryClass()))
         {
             final Collection<? extends ConfiguredObject> children = getChildren(childClass);
@@ -352,11 +353,17 @@ public class BrokerAdapter extends Abstr
                         hasBrokerAnyErroredChildren = true;
                         LOGGER.warn("Broker child object '{}' of type '{}' is {}",
                                 child.getName(), childClass.getSimpleName(), State.ERRORED);
+                        failedChildren.add(child);
                     }
                 }
             }
         }
 
+        if(!failedChildren.isEmpty())
+        {
+            getEventLogger().message(BrokerMessages.FAILED_CHILDREN(failedChildren.toString()));
+        }
+
         final boolean brokerShutdownOnErroredChild = getContextValue(Boolean.class,
                                                                      BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD);
         if (!_parent.isManagementMode() && brokerShutdownOnErroredChild && hasBrokerAnyErroredChildren)

Modified: qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java (original)
+++ qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java Wed May 18 15:36:41 2016
@@ -328,7 +328,7 @@ abstract public class AbstractPort<X ext
     @Override
     public String toString()
     {
-        return getClass().getSimpleName() + " [id=" + getId() + ", name=" + getName() + ", port=" + getPort() + "]";
+        return getCategoryClass().getSimpleName() + "[id=" + getId() + ", name=" + getName() + ", type=" + getType() +  ", port=" + getPort() + "]";
     }
 
 

Modified: qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java (original)
+++ qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java Wed May 18 15:36:41 2016
@@ -69,6 +69,7 @@ import org.apache.qpid.server.plugin.Pro
 import org.apache.qpid.server.plugin.QpidServiceLoader;
 import org.apache.qpid.server.plugin.TransportProviderFactory;
 import org.apache.qpid.server.transport.AcceptingTransport;
+import org.apache.qpid.server.transport.PortBindFailureException;
 import org.apache.qpid.server.transport.TransportProvider;
 import org.apache.qpid.server.util.PortUtil;
 import org.apache.qpid.server.util.ServerScopedRuntimeException;
@@ -260,20 +261,28 @@ public class AmqpPortImpl extends Abstra
                 _sslContext = createSslContext();
             }
             Protocol defaultSupportedProtocolReply = getDefaultAmqpSupportedReply();
+            try
+            {
+                _transport = transportProvider.createTransport(transportSet,
+                                                               _sslContext,
+                                                               this,
+                                                               getProtocols(),
+                                                               defaultSupportedProtocolReply);
 
-            _transport = transportProvider.createTransport(transportSet,
-                                                           _sslContext,
-                                                           this,
-                                                           getProtocols(),
-                                                           defaultSupportedProtocolReply);
-
-            _transport.start();
-            for (Transport transport : getTransports())
+                _transport.start();
+                for (Transport transport : getTransports())
+                {
+                    _broker.getEventLogger()
+                            .message(BrokerMessages.LISTENING(String.valueOf(transport),
+                                                              _transport.getAcceptingPort()));
+                }
+                return State.ACTIVE;
+            }
+            catch (PortBindFailureException e)
             {
-                _broker.getEventLogger().message(BrokerMessages.LISTENING(String.valueOf(transport), _transport.getAcceptingPort()));
+                _broker.getEventLogger().message(PortMessages.BIND_FAILED(getType().toUpperCase(),getPort()));
+                throw e;
             }
-
-            return State.ACTIVE;
         }
     }
 

Modified: qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingNetworkTransport.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingNetworkTransport.java?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingNetworkTransport.java (original)
+++ qpid/java/branches/6.0.x/broker-core/src/main/java/org/apache/qpid/server/transport/NonBlockingNetworkTransport.java Wed May 18 15:36:41 2016
@@ -21,6 +21,7 @@
 package org.apache.qpid.server.transport;
 
 import java.io.IOException;
+import java.net.BindException;
 import java.net.InetSocketAddress;
 import java.net.SocketAddress;
 import java.net.StandardSocketOptions;
@@ -35,8 +36,6 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.qpid.configuration.CommonProperties;
 import org.apache.qpid.transport.TransportException;
-import org.apache.qpid.transport.network.AggregateTicker;
-import org.apache.qpid.transport.network.Ticker;
 import org.apache.qpid.transport.network.TransportEncryption;
 
 import static org.apache.qpid.transport.ConnectionSettings.WILDCARD_ADDRESS;
@@ -86,7 +85,14 @@ public class NonBlockingNetworkTransport
             _serverSocket =  ServerSocketChannel.open();
 
             _serverSocket.setOption(StandardSocketOptions.SO_REUSEADDR, true);
-            _serverSocket.bind(_address, acceptBacklog);
+            try
+            {
+                _serverSocket.bind(_address, acceptBacklog);
+            }
+            catch (BindException e)
+            {
+                throw new PortBindFailureException(_address);
+            }
             _serverSocket.configureBlocking(false);
             _encryptionSet = encryptionSet;
             _scheduler = scheduler;

Modified: qpid/java/branches/6.0.x/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java?rev=1744426&r1=1744425&r2=1744426&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java (original)
+++ qpid/java/branches/6.0.x/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java Wed May 18 15:36:41 2016
@@ -22,6 +22,8 @@ package org.apache.qpid.server.managemen
 
 import java.io.IOException;
 import java.io.Writer;
+import java.net.BindException;
+import java.net.InetSocketAddress;
 import java.security.GeneralSecurityException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -45,6 +47,7 @@ import javax.servlet.http.HttpServletReq
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 
+import org.apache.qpid.server.logging.messages.PortMessages;
 import org.apache.qpid.server.management.plugin.filter.ExceptionHandlingFilter;
 import org.eclipse.jetty.io.EndPoint;
 import org.eclipse.jetty.server.Connector;
@@ -87,6 +90,7 @@ import org.apache.qpid.server.model.*;
 import org.apache.qpid.server.model.adapter.AbstractPluginAdapter;
 import org.apache.qpid.server.model.port.HttpPort;
 import org.apache.qpid.server.model.port.PortManager;
+import org.apache.qpid.server.transport.PortBindFailureException;
 import org.apache.qpid.server.util.ServerScopedRuntimeException;
 import org.apache.qpid.transport.network.security.ssl.QpidMultipleTrustManager;
 import org.apache.qpid.transport.network.security.ssl.SSLUtil;
@@ -165,6 +169,11 @@ public class HttpManagement extends Abst
                 _server.start();
                 logOperationalListenMessages();
             }
+            catch (PortBindFailureException e)
+            {
+                getBroker().getEventLogger().message(PortMessages.BIND_FAILED("HTTP", e.getAddress().getPort()));
+                throw e;
+            }
             catch (Exception e)
             {
                 throw new ServerScopedRuntimeException("Failed to start HTTP management on ports : " + httpPorts, e);
@@ -324,6 +333,20 @@ public class HttpManagement extends Abst
                                 super.customize(endpoint, request);
                                 request.setAttribute(PORT_SERVLET_ATTRIBUTE, thePort);
                             }
+
+                            public void open() throws IOException
+                            {
+                                try
+                                {
+                                    super.open();
+                                }
+                                catch (BindException e)
+                                {
+                                    InetSocketAddress addr = getHost() == null ? new InetSocketAddress(getPort())
+                                                                               : new InetSocketAddress(getHost(), getPort());
+                                    throw new PortBindFailureException(addr);
+                                }
+                            }
                         };
         }
         else if (transports.contains(Transport.SSL))
@@ -469,6 +492,20 @@ public class HttpManagement extends Abst
                             super.customize(endpoint, request);
                             request.setAttribute(PORT_SERVLET_ATTRIBUTE, port);
                         }
+
+                        public void open() throws IOException
+                        {
+                            try
+                            {
+                                super.open();
+                            }
+                            catch (BindException e)
+                            {
+                                InetSocketAddress addr = getHost() == null ? new InetSocketAddress(getPort())
+                                        : new InetSocketAddress(getHost(), getPort());
+                                throw new PortBindFailureException(addr);
+                            }
+                        }
                     }
                 : new SslSelectChannelConnector(factory)
                     {
@@ -478,6 +515,20 @@ public class HttpManagement extends Abst
                             super.customize(endpoint, request);
                             request.setAttribute(PORT_SERVLET_ATTRIBUTE, port);
                         }
+
+                        public void open() throws IOException
+                        {
+                            try
+                            {
+                                super.open();
+                            }
+                            catch (BindException e)
+                            {
+                                InetSocketAddress addr = getHost() == null ? new InetSocketAddress(getPort())
+                                        : new InetSocketAddress(getHost(), getPort());
+                                throw new PortBindFailureException(addr);
+                            }
+                        }
                     };
         return connector;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org