ryeats commented on a change in pull request #3869:
URL: https://github.com/apache/activemq-artemis/pull/3869#discussion_r761548214



##########
File path: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ssl/OpenSSLContextFactoryProvider.java
##########
@@ -25,7 +25,7 @@
    private static final OpenSSLContextFactory FACTORY;
    static {
       OpenSSLContextFactory factoryWithHighestPrio = null;
-      for (OpenSSLContextFactory factory : 
ServiceLoader.load(OpenSSLContextFactory.class)) {

Review comment:
       OSGi in certain conditions has issues with 
ServiceLoader.load(<class>.class) which uses 
Thread.currentThread().getContextClassLoader() because that classloader is not 
always the same as the one that is available to the bundle throughout its life. 
This change should be transparent for any environment that doesn’t juggle 
class-loaders like OSGi since either way would end up returning the same 
class-loader.
   
   As far as writing a test its difficult since the conditions i was seeing 
errors are hard to recreate see the JIRA for details.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to