activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] michaelandrepearce commented on a change in pull request #2517: [ARTEMIS-2171]: ThreadPoolExecutor leak under SM due to lack of privileged block.
Date Fri, 25 Jan 2019 08:26:55 GMT
michaelandrepearce 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_r250896278
 
 

 ##########
 File path: artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
 ##########
 @@ -153,7 +153,12 @@ public synchronized void start() {
    }
 
    protected ActiveMQThreadFactory getThreadFactory() {
-      return new ActiveMQThreadFactory(this.getClass().getSimpleName() + "-scheduled-threads",
false, getThisClassLoader());
+      return AccessController.doPrivileged(new PrivilegedAction<ActiveMQThreadFactory>()
{
+         @Override
+         public ActiveMQThreadFactory run() {
+            return new ActiveMQThreadFactory(this.getClass().getSimpleName() + "-scheduled-threads",
false, getThisClassLoader());
 
 Review comment:
   As i said if you can supply a test with this PR to recreate the issue. then we can validate
what does or what does not need to be changed.
   
   E.g. if it is truely needed then may look to put the logic in one common place.
   
   And like wise avoid future breakage should new code be added or existing refactored
   
   The fact i believe wildfly has been using 1.5 of artemis without issue and the same thread
factory is there. Its important that the issue is well understood, and avoid future regression

----------------------------------------------------------------
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

Mime
View raw message