qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1754428 - in /qpid/java/branches/6.0.x: ./ client/src/main/java/org/apache/qpid/client/AMQConnection.java
Date Thu, 28 Jul 2016 16:23:23 GMT
Author: kwall
Date: Thu Jul 28 16:23:23 2016
New Revision: 1754428

URL: http://svn.apache.org/viewvc?rev=1754428&view=rev
Log:
QPID-6377: [Java Client] Prevent a connection failure on initial connection leaking a taskpool/thread
Merged from trunk with command svn diff -c 1754392 ^/qpid/java/trunk


Modified:
    qpid/java/branches/6.0.x/   (props changed)
    qpid/java/branches/6.0.x/client/src/main/java/org/apache/qpid/client/AMQConnection.java

Propchange: qpid/java/branches/6.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 28 16:23:23 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,1732465,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,1743982,1744012-1744013,1744046,1744123,1744157,1744276,1744403,1745424,1745450,1746140,1746273,1747526,1748254,1748723,1748818,1749349,1749399,1749482,1749524,1750359-1750360,1750943,1751433,1754354
+/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,1732465,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,1743982,1744012-1744013,1744046,1744123,1744157,1744276,1744403,1745424,1745450,1746140,1746273,1747526,1748254,1748723,1748818,1749349,1749399,1749482,1749524,1750359-1750360,1750943,1751433,1754354,1754392
 /qpid/trunk/qpid:796646-796653

Modified: qpid/java/branches/6.0.x/client/src/main/java/org/apache/qpid/client/AMQConnection.java
URL: http://svn.apache.org/viewvc/qpid/java/branches/6.0.x/client/src/main/java/org/apache/qpid/client/AMQConnection.java?rev=1754428&r1=1754427&r2=1754428&view=diff
==============================================================================
--- qpid/java/branches/6.0.x/client/src/main/java/org/apache/qpid/client/AMQConnection.java
(original)
+++ qpid/java/branches/6.0.x/client/src/main/java/org/apache/qpid/client/AMQConnection.java
Thu Jul 28 16:23:23 2016
@@ -294,226 +294,233 @@ public class AMQConnection extends Close
         this(new AMQConnectionURL(connection));
     }
 
-    /**
-     * TODO Some horrible stuff going on here with setting exceptions to be non-null to detect
if an exception
-     * was thrown during the connection! Intention not clear. Use a flag anyway, not exceptions...
Will fix soon.
-     */
     public AMQConnection(ConnectionURL connectionURL) throws QpidException
     {
-        if (connectionURL == null)
+        boolean success = false;
+        try
         {
-            throw new IllegalArgumentException("Connection must be specified");
-        }
+            if (connectionURL == null)
+            {
+                throw new IllegalArgumentException("Connection must be specified");
+            }
 
-        if (_logger.isDebugEnabled())
-        {
-            _logger.debug("Connection(" + _connectionNumber + "):" + connectionURL);
-        }
+            if (_logger.isDebugEnabled())
+            {
+                _logger.debug("Connection(" + _connectionNumber + "):" + connectionURL);
+            }
 
-        // set this connection maxPrefetch
-        if (connectionURL.getOption(ConnectionURL.OPTIONS_MAXPREFETCH) != null)
-        {
-            _maxPrefetch = Integer.parseInt(connectionURL.getOption(ConnectionURL.OPTIONS_MAXPREFETCH));
-        }
-        else
-        {
-            // use the default value set for all connections
-            _maxPrefetch = Integer.parseInt(System.getProperties().getProperty(ClientProperties.MAX_PREFETCH_PROP_NAME,
-                    ClientProperties.MAX_PREFETCH_DEFAULT));
-        }
+            // set this connection maxPrefetch
+            if (connectionURL.getOption(ConnectionURL.OPTIONS_MAXPREFETCH) != null)
+            {
+                _maxPrefetch = Integer.parseInt(connectionURL.getOption(ConnectionURL.OPTIONS_MAXPREFETCH));
+            }
+            else
+            {
+                // use the default value set for all connections
+                _maxPrefetch = Integer.parseInt(System.getProperties().getProperty(ClientProperties.MAX_PREFETCH_PROP_NAME,
+                        ClientProperties.MAX_PREFETCH_DEFAULT));
+            }
 
-        if (connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_PERSISTENCE) != null)
-        {
-            _syncPersistence =
-                Boolean.parseBoolean(connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_PERSISTENCE));
-            _logger.warn("sync_persistence is a deprecated property, " +
-            		"please use sync_publish={persistent|all} instead");
-        }
-        else
-        {
-            // use the default value set for all connections
-            _syncPersistence = Boolean.getBoolean(ClientProperties.SYNC_PERSISTENT_PROP_NAME);
-            if (_syncPersistence)
+            if (connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_PERSISTENCE) != null)
             {
+                _syncPersistence =
+                    Boolean.parseBoolean(connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_PERSISTENCE));
                 _logger.warn("sync_persistence is a deprecated property, " +
                         "please use sync_publish={persistent|all} instead");
             }
-        }
-
-        if (connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_ACK) != null)
-        {
-            _syncAck = Boolean.parseBoolean(connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_ACK));
-        }
-        else
-        {
-            // use the default value set for all connections
-            _syncAck = Boolean.getBoolean(ClientProperties.SYNC_ACK_PROP_NAME);
-        }
+            else
+            {
+                // use the default value set for all connections
+                _syncPersistence = Boolean.getBoolean(ClientProperties.SYNC_PERSISTENT_PROP_NAME);
+                if (_syncPersistence)
+                {
+                    _logger.warn("sync_persistence is a deprecated property, " +
+                            "please use sync_publish={persistent|all} instead");
+                }
+            }
 
-        if (connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_PUBLISH) != null)
-        {
-            _syncPublish = connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_PUBLISH);
-        }
-        else
-        {
-            // use the default value set for all connections
-            _syncPublish = System.getProperty((ClientProperties.SYNC_PUBLISH_PROP_NAME),_syncPublish);
-        }
+            if (connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_ACK) != null)
+            {
+                _syncAck = Boolean.parseBoolean(connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_ACK));
+            }
+            else
+            {
+                // use the default value set for all connections
+                _syncAck = Boolean.getBoolean(ClientProperties.SYNC_ACK_PROP_NAME);
+            }
 
-        if (connectionURL.getOption(ConnectionURL.OPTIONS_POPULATE_USER_ID) != null)
-        {
-            _populateUserId = Boolean.parseBoolean(connectionURL.getOption(ConnectionURL.OPTIONS_POPULATE_USER_ID));
-        }
+            if (connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_PUBLISH) != null)
+            {
+                _syncPublish = connectionURL.getOption(ConnectionURL.OPTIONS_SYNC_PUBLISH);
+            }
+            else
+            {
+                // use the default value set for all connections
+                _syncPublish = System.getProperty((ClientProperties.SYNC_PUBLISH_PROP_NAME),_syncPublish);
+            }
 
-        if (connectionURL.getOption(ConnectionURL.OPTIONS_USE_LEGACY_MAP_MESSAGE_FORMAT)
!= null)
-        {
-            _useLegacyMapMessageFormat =  Boolean.parseBoolean(
-                    connectionURL.getOption(ConnectionURL.OPTIONS_USE_LEGACY_MAP_MESSAGE_FORMAT));
-        }
-        else
-        {
-            // use the default value set for all connections
-            _useLegacyMapMessageFormat = Boolean.getBoolean(ClientProperties.USE_LEGACY_MAP_MESSAGE_FORMAT);
-        }
+            if (connectionURL.getOption(ConnectionURL.OPTIONS_POPULATE_USER_ID) != null)
+            {
+                _populateUserId = Boolean.parseBoolean(connectionURL.getOption(ConnectionURL.OPTIONS_POPULATE_USER_ID));
+            }
 
-        if (connectionURL.getOption(ConnectionURL.OPTIONS_USE_LEGACY_STREAM_MESSAGE_FORMAT)
!= null)
-        {
-            _useLegacyStreamMessageFormat =  Boolean.parseBoolean(
-                    connectionURL.getOption(ConnectionURL.OPTIONS_USE_LEGACY_STREAM_MESSAGE_FORMAT));
-        }
-        else
-        {
-            // use the default value set for all connections
-            _useLegacyStreamMessageFormat = System.getProperty(ClientProperties.USE_LEGACY_STREAM_MESSAGE_FORMAT)
== null ?
-                    true : Boolean.getBoolean(ClientProperties.USE_LEGACY_STREAM_MESSAGE_FORMAT);
-        }
+            if (connectionURL.getOption(ConnectionURL.OPTIONS_USE_LEGACY_MAP_MESSAGE_FORMAT)
!= null)
+            {
+                _useLegacyMapMessageFormat =  Boolean.parseBoolean(
+                        connectionURL.getOption(ConnectionURL.OPTIONS_USE_LEGACY_MAP_MESSAGE_FORMAT));
+            }
+            else
+            {
+                // use the default value set for all connections
+                _useLegacyMapMessageFormat = Boolean.getBoolean(ClientProperties.USE_LEGACY_MAP_MESSAGE_FORMAT);
+            }
 
-        if(connectionURL.getOption(ConnectionURL.OPTIONS_VERIFY_QUEUE_ON_SEND) != null)
-        {
-            _validateQueueOnSend = Boolean.parseBoolean(
-                                connectionURL.getOption(ConnectionURL.OPTIONS_VERIFY_QUEUE_ON_SEND));
-        }
-        else
-        {
-            _validateQueueOnSend =
-                Boolean.parseBoolean(System.getProperty(ClientProperties.VERIFY_QUEUE_ON_SEND,
"false"));
-        }
+            if (connectionURL.getOption(ConnectionURL.OPTIONS_USE_LEGACY_STREAM_MESSAGE_FORMAT)
!= null)
+            {
+                _useLegacyStreamMessageFormat =  Boolean.parseBoolean(
+                        connectionURL.getOption(ConnectionURL.OPTIONS_USE_LEGACY_STREAM_MESSAGE_FORMAT));
+            }
+            else
+            {
+                // use the default value set for all connections
+                _useLegacyStreamMessageFormat = System.getProperty(ClientProperties.USE_LEGACY_STREAM_MESSAGE_FORMAT)
== null ?
+                        true : Boolean.getBoolean(ClientProperties.USE_LEGACY_STREAM_MESSAGE_FORMAT);
+            }
 
-        if(connectionURL.getOption(ConnectionURL.OPTIONS_COMPRESS_MESSAGES) != null)
-        {
-            _compressMessages = Boolean.parseBoolean(connectionURL.getOption(ConnectionURL.OPTIONS_COMPRESS_MESSAGES));
-        }
-        else
-        {
-            _compressMessages =
-                    Boolean.parseBoolean(System.getProperty(ClientProperties.CONNECTION_OPTION_COMPRESS_MESSAGES,
-                                         String.valueOf(ClientProperties.DEFAULT_CONNECTION_OPTION_COMPRESS_MESSAGES)));
-        }
+            if(connectionURL.getOption(ConnectionURL.OPTIONS_VERIFY_QUEUE_ON_SEND) != null)
+            {
+                _validateQueueOnSend = Boolean.parseBoolean(
+                                    connectionURL.getOption(ConnectionURL.OPTIONS_VERIFY_QUEUE_ON_SEND));
+            }
+            else
+            {
+                _validateQueueOnSend =
+                    Boolean.parseBoolean(System.getProperty(ClientProperties.VERIFY_QUEUE_ON_SEND,
"false"));
+            }
 
+            if(connectionURL.getOption(ConnectionURL.OPTIONS_COMPRESS_MESSAGES) != null)
+            {
+                _compressMessages = Boolean.parseBoolean(connectionURL.getOption(ConnectionURL.OPTIONS_COMPRESS_MESSAGES));
+            }
+            else
+            {
+                _compressMessages =
+                        Boolean.parseBoolean(System.getProperty(ClientProperties.CONNECTION_OPTION_COMPRESS_MESSAGES,
+                                             String.valueOf(ClientProperties.DEFAULT_CONNECTION_OPTION_COMPRESS_MESSAGES)));
+            }
 
-        if(connectionURL.getOption(ConnectionURL.OPTIONS_MESSAGES_COMPRESSION_THRESHOLD_SIZE)
!= null)
-        {
-            _messageCompressionThresholdSize = Integer.valueOf(connectionURL.getOption(ConnectionURL.OPTIONS_MESSAGES_COMPRESSION_THRESHOLD_SIZE));
-        }
-        else
-        {
-            _messageCompressionThresholdSize = Integer.getInteger(ClientProperties.CONNECTION_OPTION_MESSAGE_COMPRESSION_THRESHOLD_SIZE,
-                                                                ClientProperties.DEFAULT_MESSAGE_COMPRESSION_THRESHOLD_SIZE);
-        }
-        if(_messageCompressionThresholdSize <= 0)
-        {
-            _messageCompressionThresholdSize = Integer.MAX_VALUE;
-        }
+            if(connectionURL.getOption(ConnectionURL.OPTIONS_MESSAGES_COMPRESSION_THRESHOLD_SIZE)
!= null)
+            {
+                _messageCompressionThresholdSize = Integer.valueOf(connectionURL.getOption(ConnectionURL.OPTIONS_MESSAGES_COMPRESSION_THRESHOLD_SIZE));
+            }
+            else
+            {
+                _messageCompressionThresholdSize = Integer.getInteger(ClientProperties.CONNECTION_OPTION_MESSAGE_COMPRESSION_THRESHOLD_SIZE,
+                                                                    ClientProperties.DEFAULT_MESSAGE_COMPRESSION_THRESHOLD_SIZE);
+            }
+            if(_messageCompressionThresholdSize <= 0)
+            {
+                _messageCompressionThresholdSize = Integer.MAX_VALUE;
+            }
 
-        String amqpVersion = System.getProperty((ClientProperties.AMQP_VERSION), "0-10");
-        if (_logger.isDebugEnabled())
-        {
-            _logger.debug("AMQP version " + amqpVersion);
-        }
+            String amqpVersion = System.getProperty((ClientProperties.AMQP_VERSION), "0-10");
+            if (_logger.isDebugEnabled())
+            {
+                _logger.debug("AMQP version " + amqpVersion);
+            }
 
-        _failoverPolicy = new FailoverPolicy(connectionURL, this);
-        if ("0-8".equals(amqpVersion))
-        {
-            _delegate = new AMQConnectionDelegate_8_0(this);
-        }
-        else if ("0-9".equals(amqpVersion))
-        {
-            _delegate = new AMQConnectionDelegate_0_9(this);
-        }
-        else if ("0-91".equals(amqpVersion) || "0-9-1".equals(amqpVersion))
-        {
-            _delegate = new AMQConnectionDelegate_0_91(this);
-        }
-        else
-        {
-            _delegate = new AMQConnectionDelegate_0_10(this);
-        }
+            _failoverPolicy = new FailoverPolicy(connectionURL, this);
+            if ("0-8".equals(amqpVersion))
+            {
+                _delegate = new AMQConnectionDelegate_8_0(this);
+            }
+            else if ("0-9".equals(amqpVersion))
+            {
+                _delegate = new AMQConnectionDelegate_0_9(this);
+            }
+            else if ("0-91".equals(amqpVersion) || "0-9-1".equals(amqpVersion))
+            {
+                _delegate = new AMQConnectionDelegate_0_91(this);
+            }
+            else
+            {
+                _delegate = new AMQConnectionDelegate_0_10(this);
+            }
 
-        _connectionURL = connectionURL;
+            _connectionURL = connectionURL;
 
-        _clientName = connectionURL.getClientName();
-        _username = connectionURL.getUsername();
-        _password = connectionURL.getPassword();
+            _clientName = connectionURL.getClientName();
+            _username = connectionURL.getUsername();
+            _password = connectionURL.getPassword();
 
-        setVirtualHost(connectionURL.getVirtualHost());
+            setVirtualHost(connectionURL.getVirtualHost());
 
-        if (connectionURL.getDefaultQueueExchangeName() != null)
-        {
-            _defaultQueueExchangeName = connectionURL.getDefaultQueueExchangeName();
-        }
+            if (connectionURL.getDefaultQueueExchangeName() != null)
+            {
+                _defaultQueueExchangeName = connectionURL.getDefaultQueueExchangeName();
+            }
 
-        if (connectionURL.getDefaultTopicExchangeName() != null)
-        {
-            _defaultTopicExchangeName = connectionURL.getDefaultTopicExchangeName();
-        }
+            if (connectionURL.getDefaultTopicExchangeName() != null)
+            {
+                _defaultTopicExchangeName = connectionURL.getDefaultTopicExchangeName();
+            }
 
-        if (connectionURL.getTemporaryQueueExchangeName() != null)
-        {
-            _temporaryQueueExchangeName = connectionURL.getTemporaryQueueExchangeName();
-        }
+            if (connectionURL.getTemporaryQueueExchangeName() != null)
+            {
+                _temporaryQueueExchangeName = connectionURL.getTemporaryQueueExchangeName();
+            }
 
-        if (connectionURL.getTemporaryTopicExchangeName() != null)
-        {
-            _temporaryTopicExchangeName = connectionURL.getTemporaryTopicExchangeName();
-        }
+            if (connectionURL.getTemporaryTopicExchangeName() != null)
+            {
+                _temporaryTopicExchangeName = connectionURL.getTemporaryTopicExchangeName();
+            }
 
-        _protocolHandler = new AMQProtocolHandler(this);
+            _protocolHandler = new AMQProtocolHandler(this);
 
-        if (_logger.isDebugEnabled())
-        {
-        	_logger.debug("Connecting with ProtocolHandler Version:"+_protocolHandler.getProtocolVersion());
-        }
+            if (_logger.isDebugEnabled())
+            {
+                _logger.debug("Connecting with ProtocolHandler Version:"+_protocolHandler.getProtocolVersion());
+            }
 
-        // We are not currently connected
-        setConnected(false);
+            // We are not currently connected
+            setConnected(false);
 
-        if(_clientName != null)
-        {
-            makeConnection();
-        }
+            if (_clientName != null)
+            {
+                makeConnection();
+            }
 
-        _connectionMetaData = new QpidConnectionMetaData();
+            _connectionMetaData = new QpidConnectionMetaData();
 
-        if (connectionURL.getOption(ConnectionURL.OPTIONS_OBJECT_MESSAGE_CLASS_HIERARCHY_WHITE_LIST)
!= null)
-        {
-            String whiteListedClassHierarchiesString = connectionURL.getOption(ConnectionURL.OPTIONS_OBJECT_MESSAGE_CLASS_HIERARCHY_WHITE_LIST);
-            _whiteListedClassHierarchies = Arrays.asList(whiteListedClassHierarchiesString.split(","));
-        }
-        else
-        {
-            final String defaultWhiteListedClassHierarchiesString = System.getProperty(CommonProperties.QPID_SECURITY_OBJECT_MESSAGE_CLASS_HIERARCHY_WHITE_LIST,
"*");
-            _whiteListedClassHierarchies = Arrays.asList(defaultWhiteListedClassHierarchiesString.split(","));
-        }
+            if (connectionURL.getOption(ConnectionURL.OPTIONS_OBJECT_MESSAGE_CLASS_HIERARCHY_WHITE_LIST)
!= null)
+            {
+                String whiteListedClassHierarchiesString = connectionURL.getOption(ConnectionURL.OPTIONS_OBJECT_MESSAGE_CLASS_HIERARCHY_WHITE_LIST);
+                _whiteListedClassHierarchies = Arrays.asList(whiteListedClassHierarchiesString.split(","));
+            }
+            else
+            {
+                final String defaultWhiteListedClassHierarchiesString = System.getProperty(CommonProperties.QPID_SECURITY_OBJECT_MESSAGE_CLASS_HIERARCHY_WHITE_LIST,
"*");
+                _whiteListedClassHierarchies = Arrays.asList(defaultWhiteListedClassHierarchiesString.split(","));
+            }
 
-        if (connectionURL.getOption(ConnectionURL.OPTIONS_OBJECT_MESSAGE_CLASS_HIERARCHY_BLACK_LIST)
!= null)
-        {
-            String blackListedClassHierarchiesString = connectionURL.getOption(ConnectionURL.OPTIONS_OBJECT_MESSAGE_CLASS_HIERARCHY_BLACK_LIST);
-            _blackListedClassHierarchies = Arrays.asList(blackListedClassHierarchiesString.split(","));
+            if (connectionURL.getOption(ConnectionURL.OPTIONS_OBJECT_MESSAGE_CLASS_HIERARCHY_BLACK_LIST)
!= null)
+            {
+                String blackListedClassHierarchiesString = connectionURL.getOption(ConnectionURL.OPTIONS_OBJECT_MESSAGE_CLASS_HIERARCHY_BLACK_LIST);
+                _blackListedClassHierarchies = Arrays.asList(blackListedClassHierarchiesString.split(","));
+            }
+            else
+            {
+                final String defaultBlackListedClassHierarchiesString = System.getProperty(CommonProperties.QPID_SECURITY_OBJECT_MESSAGE_CLASS_HIERARCHY_BLACK_LIST,
"");
+                _blackListedClassHierarchies = Arrays.asList(defaultBlackListedClassHierarchiesString.split(","));
+            }
+            success = true;
         }
-        else
+        finally
         {
-            final String defaultBlackListedClassHierarchiesString = System.getProperty(CommonProperties.QPID_SECURITY_OBJECT_MESSAGE_CLASS_HIERARCHY_BLACK_LIST,
"");
-            _blackListedClassHierarchies = Arrays.asList(defaultBlackListedClassHierarchiesString.split(","));
+            if (!success)
+            {
+                shutdownTaskPool();
+            }
         }
     }
 



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


Mime
View raw message