You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2018/02/16 21:12:08 UTC

svn commit: r1824558 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java

Author: struberg
Date: Fri Feb 16 21:12:08 2018
New Revision: 1824558

URL: http://svn.apache.org/viewvc?rev=1824558&view=rev
Log:
reverting -r1822816

The main change of the original commit was to move the TCCL resolution and calling setExtension.
This seems to break the Tomcat ParallelWebAppClassLoader.
Rather it seems that the cleanup then is being performed on the tomcat side, even if the server is already shut down.

I've reverted this change for now. up 4 review!

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java?rev=1824558&r1=1824557&r2=1824558&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java (original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cxf/MeecrowaveBus.java Fri Feb 16 21:12:08 2018
@@ -77,9 +77,9 @@ public class MeecrowaveBus implements Bu
 
     @Inject
     public MeecrowaveBus(final ServletContext context) {
-        final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
         setProperty(ClassUnwrapper.class.getName(), (ClassUnwrapper) this::getRealClass);
-        setExtension(contextClassLoader, ClassLoader.class); // ServletController locks on the classloader otherwise
+
+        //X broken, breaks Paralell Tomcat classloader setExtension(contextClassLoader, ClassLoader.class); // ServletController locks on the classloader otherwise
 
         final Meecrowave.Builder builder = Meecrowave.Builder.class.cast(context.getAttribute("meecrowave.configuration"));
         if (builder != null && builder.isJaxrsProviderSetup()) {
@@ -135,6 +135,7 @@ public class MeecrowaveBus implements Bu
 
             if (builder.isJaxrsAutoActivateBeanValidation()) {
                 try { // we don't need the jaxrsbeanvalidationfeature since bean validation cdi extension handles it normally
+                    final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
                     contextClassLoader.loadClass("javax.validation.Validation");
                     final Object instance = contextClassLoader.loadClass("org.apache.cxf.jaxrs.validation.ValidationExceptionMapper")
                                                        .getConstructor().newInstance();