You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by GitBox <gi...@apache.org> on 2019/01/24 21:24:19 UTC

[GitHub] ehsavoie commented on a change in pull request #2517: [ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged block.

ehsavoie commented on a change in pull request #2517: [ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged block.
URL: https://github.com/apache/activemq-artemis/pull/2517#discussion_r250782433
 
 

 ##########
 File path: artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DBOption.java
 ##########
 @@ -223,13 +225,17 @@ protected void initializeJournal(Configuration configuration) throws Exception {
       this.config = configuration;
       executor = Executors.newFixedThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory());
       executorFactory = new OrderedExecutorFactory(executor);
-
-      scheduledExecutorService = new ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(), new ThreadFactory() {
+      scheduledExecutorService = new ScheduledThreadPoolExecutor(configuration.getScheduledThreadPoolMaxSize(), AccessController.doPrivileged(new PrivilegedAction<ThreadFactory>() {
          @Override
-         public Thread newThread(Runnable r) {
-            return new Thread(r);
+         public ThreadFactory run() {
 
 Review comment:
   Because i looked at all threadFactories that werre not protected, didn't check the implementation. Sorry for this noise on ActiveMQThreadFactory

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services