1 2 Previous Next 19 Replies Latest reply on Dec 8, 2008 3:34 PM by kabirkhan Go to original post
      • 15. Re: Remaing classLoader changes
        starksm64

        Another feature I need is the ability to specify the packages that should be excluded in the package visitation scan. For a war, everything under WEB-INF/classes, WEB-INF/lib/*.jar should be visible, unless they are java.* or javax.servlet.* classes. I'm working on this for the war class loader changes.

        http://jira.jboss.org/jira/browse/JBMICROCONT-228

        • 16. Re: Remaing classLoader changes

           

          "scott.stark@jboss.org" wrote:
          Another feature I need is the ability to specify the packages that should be excluded in the package visitation scan. For a war, everything under WEB-INF/classes, WEB-INF/lib/*.jar should be visible, unless they are java.* or javax.servlet.* classes. I'm working on this for the war class loader changes.

          http://jira.jboss.org/jira/browse/JBMICROCONT-228


          I don't think your excluded packages is doing what you think it is doing. ;-)
          Or if it is, it should be called setExcludedExportPackages() which I guess
          would only be useful with exportAll?

          What you've done is remove the packages from the exports.
          They will still be used on local classloading requests.
          A real excluded packages would need to filter out those requests
          that ask for resources/streams in that package.

          Also, wouldn't it more efficient to filter out the exlcuded packages
          when it does the getPackages() callback

           public Set<String> getPackages()
           {
           if (excluedPackages != null)
           packages.removeAll(excludedPackages);
           return packages;
           }
          


          rather than looping through every exluded package on every visited package?

          • 17. Re: Remaing classLoader changes

            You can see examples of how to make this kind stuff work properly in:
            org.jboss.classloader.test.support.MockClassLoaderPolicy
            The ClassLoaderMetaData will have similar features when it is complete.

            • 18. Re: Remaing classLoader changes
              kabirkhan

              Adrian/Ales,

              I've had a look at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=130122, but it is not clear to me what the difference is between ModuleRequirement and PackageRequirement? Does a module represent a jar, thus meaning import everything from that jar? And is package more fine-grained, meaning only import these packages from that jar?

              Whatever the answer, I suppose the Module/Package difference would also apply to the capabilities?

              Also, what is UsesPackageRequirement?

              • 19. Re: Remaing classLoader changes
                kabirkhan

                 

                "kabir.khan@jboss.com" wrote:
                Adrian/Ales,

                I've had a look at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=130122, but it is not clear to me what the difference is between ModuleRequirement and PackageRequirement? Does a module represent a jar, thus meaning import everything from that jar? And is package more fine-grained, meaning only import these packages from that jar?

                Whatever the answer, I suppose the Module/Package difference would also apply to the capabilities?

                Also, what is UsesPackageRequirement?

                Wrong forum. I've posted it here where I meant to: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195156#4195156

                1 2 Previous Next