From commits-return-16595-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Wed Jul 6 19:12:48 2011 Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 83B0C652E for ; Wed, 6 Jul 2011 19:12:48 +0000 (UTC) Received: (qmail 53912 invoked by uid 500); 6 Jul 2011 19:12:48 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 53864 invoked by uid 500); 6 Jul 2011 19:12:48 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 53857 invoked by uid 99); 6 Jul 2011 19:12:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2011 19:12:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2011 19:12:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 75B2323888CF for ; Wed, 6 Jul 2011 19:12:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1143535 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java Date: Wed, 06 Jul 2011 19:12:26 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110706191226.75B2323888CF@eris.apache.org> Author: tabish Date: Wed Jul 6 19:12:26 2011 New Revision: 1143535 URL: http://svn.apache.org/viewvc?rev=1143535&view=rev Log: apply patch for https://issues.apache.org/jira/browse/AMQ-3074 Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?rev=1143535&r1=1143534&r2=1143535&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java Wed Jul 6 19:12:26 2011 @@ -201,7 +201,7 @@ public class TransportConnection impleme /** * Returns the number of messages to be dispatched to this connection - * + * * @return size of dispatch queue */ public int getDispatchQueueSize() { @@ -249,7 +249,7 @@ public class TransportConnection impleme * Calls the serviceException method in an async thread. Since handling a * service exception closes a socket, we should not tie up broker threads * since client sockets may hang or cause deadlocks. - * + * * @param e */ public void serviceExceptionAsync(final IOException e) { @@ -700,7 +700,7 @@ public class TransportConnection impleme if (info.getClientIp() == null) { info.setClientIp(getRemoteAddress()); } - + try { broker.addConnection(context, info); } catch (Exception e) { @@ -912,7 +912,7 @@ public class TransportConnection impleme info.setPeerBrokerInfos(null); } dispatchAsync(info); - + connector.onStarted(this); } } catch (Exception e) { @@ -1160,7 +1160,7 @@ public class TransportConnection impleme public synchronized boolean isNetworkConnection() { return networkConnection; } - + public boolean isFaultTolerantConnection() { return this.faultTolerantConnection; } @@ -1187,7 +1187,7 @@ public class TransportConnection impleme // passive ? boolean passive = bService.isPassiveSlave() || info.isPassiveSlave(); if (passive == false) { - + // stream messages from this broker (the master) to // the slave MutableBrokerFilter parent = (MutableBrokerFilter) broker.getAdaptor(MutableBrokerFilter.class); @@ -1212,7 +1212,7 @@ public class TransportConnection impleme // It's possible in case of brief network fault to have this transport connector side of the connection always active // and the duplex network connector side wanting to open a new one // In this case, the old connection must be broken - String duplexNetworkConnectorId = config.getName() + "@" + info.getBrokerId(); + String duplexNetworkConnectorId = config.getName() + "@" + info.getBrokerId(); CopyOnWriteArrayList connections = this.connector.getConnections(); synchronized (connections) { for (Iterator iter = connections.iterator(); iter.hasNext();) { @@ -1296,7 +1296,7 @@ public class TransportConnection impleme } return null; } - + public void updateClient(ConnectionControl control) { if (isActive() && isBlocked() == false && isFaultTolerantConnection() && this.wireFormatInfo != null && this.wireFormatInfo.getVersion() >= 6) { @@ -1309,7 +1309,7 @@ public class TransportConnection impleme if (result == null) { synchronized (producerExchanges) { result = new ProducerBrokerExchange(); - TransportConnectionState state = lookupConnectionState(id); + TransportConnectionState state = lookupConnectionState(id); context = state.getContext(); if (context.isReconnect()) { result.setLastStoredSequenceId(broker.getBrokerService().getPersistenceAdapter().getLastProducerSequenceId(id)); @@ -1451,7 +1451,11 @@ public class TransportConnection impleme protected synchronized String getDuplexNetworkConnectorId() { return this.duplexNetworkConnectorId; } - + + public boolean isStopping() { + return stopping.get(); + } + protected CountDownLatch getStopped() { return stopped; }