activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [23/41] activemq-artemis git commit: ARTEMIS-808 use privileges to stop executor
Date Fri, 21 Oct 2016 09:56:26 GMT
ARTEMIS-808 use privileges to stop executor


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

Branch: refs/heads/ARTEMIS-780
Commit: 0df30712b979e4fd2f413da4f3c3913a9a51956c
Parents: 85ce8cc
Author: jbertram <jbertram@apache.com>
Authored: Tue Oct 18 16:03:59 2016 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Oct 18 17:45:33 2016 -0400

----------------------------------------------------------------------
 .../activemq/artemis/jms/client/ActiveMQConnection.java   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0df30712/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
index f896494..440b576 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
@@ -33,6 +33,8 @@ import javax.jms.Topic;
 import javax.jms.TopicConnection;
 import javax.jms.TopicSession;
 import java.lang.ref.WeakReference;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.concurrent.ExecutorService;
@@ -359,7 +361,13 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl
impleme
             }
          }
 
-         failoverListenerExecutor.shutdown();
+         AccessController.doPrivileged(new PrivilegedAction() {
+            @Override
+            public Object run() {
+               failoverListenerExecutor.shutdown();
+               return null;
+            }
+         });
 
          closed = true;
       } catch (ActiveMQException e) {


Mime
View raw message