activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-5214
Date Thu, 05 Jun 2014 20:16:07 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 25f1fe846 -> 707940f1a


https://issues.apache.org/jira/browse/AMQ-5214

Check for security error on responses and log a warning so there is a
record of the event

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/707940f1
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/707940f1
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/707940f1

Branch: refs/heads/trunk
Commit: 707940f1a6f3b80d3e340cbbb7baeb3d8a5057bf
Parents: 25f1fe8
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu Jun 5 16:16:01 2014 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Thu Jun 5 16:16:01 2014 -0400

----------------------------------------------------------------------
 .../activemq/broker/TransportConnection.java    | 49 +++++++++++++++++++-
 1 file changed, 47 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/707940f1/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
index 557b88c..22a63b8 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
@@ -20,7 +20,13 @@ import java.io.EOFException;
 import java.io.IOException;
 import java.net.SocketException;
 import java.net.URI;
-import java.util.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.CountDownLatch;
@@ -31,10 +37,44 @@ import java.util.concurrent.atomic.AtomicReference;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import javax.transaction.xa.XAResource;
+
 import org.apache.activemq.advisory.AdvisorySupport;
 import org.apache.activemq.broker.region.ConnectionStatistics;
 import org.apache.activemq.broker.region.RegionBroker;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.BrokerInfo;
+import org.apache.activemq.command.Command;
+import org.apache.activemq.command.CommandTypes;
+import org.apache.activemq.command.ConnectionControl;
+import org.apache.activemq.command.ConnectionError;
+import org.apache.activemq.command.ConnectionId;
+import org.apache.activemq.command.ConnectionInfo;
+import org.apache.activemq.command.ConsumerControl;
+import org.apache.activemq.command.ConsumerId;
+import org.apache.activemq.command.ConsumerInfo;
+import org.apache.activemq.command.ControlCommand;
+import org.apache.activemq.command.DataArrayResponse;
+import org.apache.activemq.command.DestinationInfo;
+import org.apache.activemq.command.ExceptionResponse;
+import org.apache.activemq.command.FlushCommand;
+import org.apache.activemq.command.IntegerResponse;
+import org.apache.activemq.command.KeepAliveInfo;
+import org.apache.activemq.command.Message;
+import org.apache.activemq.command.MessageAck;
+import org.apache.activemq.command.MessageDispatch;
+import org.apache.activemq.command.MessageDispatchNotification;
+import org.apache.activemq.command.MessagePull;
+import org.apache.activemq.command.ProducerAck;
+import org.apache.activemq.command.ProducerId;
+import org.apache.activemq.command.ProducerInfo;
+import org.apache.activemq.command.RemoveSubscriptionInfo;
+import org.apache.activemq.command.Response;
+import org.apache.activemq.command.SessionId;
+import org.apache.activemq.command.SessionInfo;
+import org.apache.activemq.command.ShutdownInfo;
+import org.apache.activemq.command.TransactionId;
+import org.apache.activemq.command.TransactionInfo;
+import org.apache.activemq.command.WireFormatInfo;
 import org.apache.activemq.network.DemandForwardingBridge;
 import org.apache.activemq.network.MBeanNetworkListener;
 import org.apache.activemq.network.NetworkBridgeConfiguration;
@@ -307,6 +347,9 @@ public class TransportConnection implements Connection, Task, CommandVisitor
{
             }
 
             if (responseRequired) {
+                if (e instanceof SecurityException || e.getCause() instanceof SecurityException)
{
+                    SERVICELOG.warn("Security Error occurred: {}", e.getMessage());
+                }
                 response = new ExceptionResponse(e);
             } else {
                 serviceException(e);
@@ -378,6 +421,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor
{
         return null;
     }
 
+    @Override
     public int getActiveTransactionCount() {
         int rc = 0;
         for (TransportConnectionState cs : connectionStateRegister.listConnectionStates())
{
@@ -389,6 +433,7 @@ public class TransportConnection implements Connection, Task, CommandVisitor
{
         return rc;
     }
 
+    @Override
     public Long getOldestActiveTransactionDuration() {
         TransactionState oldestTX = null;
         for (TransportConnectionState cs : connectionStateRegister.listConnectionStates())
{


Mime
View raw message