activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1038658 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java
Date Wed, 24 Nov 2010 16:03:22 GMT
Author: dejanb
Date: Wed Nov 24 16:03:22 2010
New Revision: 1038658

URL: http://svn.apache.org/viewvc?rev=1038658&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-3052 - memory leak in SimpleAuthenticationBroker

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java?rev=1038658&r1=1038657&r2=1038658&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthenticationBroker.java
Wed Nov 24 16:03:22 2010
@@ -92,7 +92,13 @@ public class SimpleAuthenticationBroker 
             context.setSecurityContext(s);
             securityContexts.add(s);
         }
-        super.addConnection(context, info);
+        try {
+            super.addConnection(context, info);
+        } catch (Exception e) {
+            securityContexts.remove(s);
+            context.setSecurityContext(null);
+            throw e;
+        }
     }
 
     public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable
error)



Mime
View raw message