tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Larsen (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (TOMEE-1830) Set TomEEJarScanner TomEEFilter to delegate to standard jar scan filter as default
Date Tue, 07 Jun 2016 00:11:20 GMT

     [ https://issues.apache.org/jira/browse/TOMEE-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexander Larsen reopened TOMEE-1830:
-------------------------------------

Thanks for the fast response. There is one additional problem in regards to the system properties.
They have changed name between tomcat-7 and tomcat-8.

See [https://tomcat.apache.org/tomcat-8.5-doc/config/systemprops.html#JAR_Scanning] and [https://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html#JAR_Scanning]

The tomcat loader tries to read these properties with the old property names(which are empty),
and later on writes to the new property name(overwriting the set property values).

{noformat:title=Proposed patch}
--- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
+++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
@@ -201,18 +201,7 @@ public class TomcatLoader implements Loader {
         // don't ignore standard openejb exclusions file
         final Set<String> exclusions = new HashSet<String>(Arrays.asList(NewLoaderLogic.getExclusions()));
         {
-            final String jarToSkipProp = CatalinaProperties.getProperty("tomcat.util.scan.DefaultJarScanner.jarsToSkip");
-            if (jarToSkipProp != null && !jarToSkipProp.isEmpty()) {
-                for (final String s : jarToSkipProp.split(",")) {
-                    final String sanitize = NewLoaderLogic.sanitize(s.trim());
-                    if (!sanitize.isEmpty()) {
-                        exclusions.add(sanitize);
-                    }
-                }
-            }
-        }
-        {
-            final String jarToSkipProp = CatalinaProperties.getProperty("org.apache.catalina.startup.ContextConfig.jarsToSkip");
+            final String jarToSkipProp = CatalinaProperties.getProperty(Constants.SKIP_JARS_PROPERTY);
             if (jarToSkipProp != null && !jarToSkipProp.isEmpty()) {
                 for (final String s : jarToSkipProp.split(",")) {
                     final String sanitize = NewLoaderLogic.sanitize(s.trim());
{noformat}

I'm somewhat unsure of the correct way to handle this, the patch proposal only read value
from the new system property.

> Set TomEEJarScanner TomEEFilter to delegate to standard jar scan filter as default
> ----------------------------------------------------------------------------------
>
>                 Key: TOMEE-1830
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1830
>             Project: TomEE
>          Issue Type: Improvement
>          Components: TomEE Core Server
>    Affects Versions: 7.0.0
>            Reporter: Alexander Larsen
>            Assignee: Romain Manni-Bucau
>            Priority: Minor
>             Fix For: 7.0.1
>
>
> Since TomEE replaces the StandardJarScanner and it's filter by default, it does not respect
the tomcat.util.scan.StandardJarScanFilter.* system properties. 
> This can be worked around by adding a JarScanner element in context.xml, but it might
be more intuitive if the delegate in TomEEFilter was set by default when creating the TomEEJarScanner.
> [Pull request|https://github.com/apache/tomee/pull/33]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message