1 Reply Latest reply on Dec 28, 2009 11:22 AM by jaikiran pai

    Need ClassFilterUtils.JDK6 ?

    Andrew Rubinger Master

      ClassFilterUtils provides for:

       

      public static final ClassFilter JAVA_ONLY = JavaOnlyClassFilter.INSTANCE;

       

      ...where:

      private JavaOnlyClassFilter()
         {
            super(new String[] { "java\\..+", "javax\\..+" }, 
                  new String[] { "java/.+", "javax/.+" },
                  new String[] { "java", "java\\..*", "javax", "javax\\..*" });
         }
      

       

      This does not account for other non-java(x) packages within JDK6.  Perhaps we should add something like:

       

      final ClassFilter nonJavaJDK6Filter = new PackageClassFilter(new String[]
            {"org.w3c.dom", "org.xml.sax", "org.omg", "org.ietf.jgss"});
      final ClassFilter jdk6Filter = CombiningClassFilter.create(false, ClassFilterUtils.JAVA_ONLY,
                  nonJavaJDK6Filter); // Functionally equivalent to this

       

      ...?

       

      I may have a usecase in mind for EmbeddedAS (still working out if it makes more sense to provide isolation via jboss-cl or at a lower level).

       

      S,

      ALR

        • 1. Re: Need ClassFilterUtils.JDK6 ?
          jaikiran pai Master

          ALRubinger wrote:

           

           

          This does not account for other non-java(x) packages within JDK6.  Perhaps we should add something like:

           

          final ClassFilter nonJavaJDK6Filter = new PackageClassFilter(new String[]
                {"org.w3c.dom", "org.xml.sax", "org.omg", "org.ietf.jgss"});
          final ClassFilter jdk6Filter = CombiningClassFilter.create(false, ClassFilterUtils.JAVA_ONLY,
                      nonJavaJDK6Filter); // Functionally equivalent to this
          

           

          ...


          Is that for endorsed libraries? Perhaps, you need a "EndorsedClassFilter" which takes into account the libraries listed here http://java.sun.com/javase/6/docs/technotes/guides/standards/index.html? However, each JDK implementation can further have their own set of endorsed packages, so you probably will end up having different filters for each vendor?