2 Replies Latest reply on Apr 30, 2007 12:06 PM by Scott Stark

    java2ClassLoadingCompliance

    Dimitris Andreadis Master

      Regarding http://jira.jboss.com/jira/browse/JBAS-3047, I did some adjustments on top of Scott's changes, that I want them to be reviewed.

      They way I understand it is:

      a) To use the jboss web loader, either it has to be configured as the default setting for tomcat, OR a <loader-repository> entry in jboss-web.xml will activate it. In this case the parent/child first classloading behaviour is controlled by loader-repository java2ParentDelegation, and the java2ClassLoadingCompliance flag is ignored, e.g:

      <class-loading java2ClassLoadingCompliance='false'>
       <loader-repository>dot.com:loader=unique-archive-name
       <loader-repository-config>java2ParentDelegaton=true
       </loader-repository-config>
       </loader-repository>
      </class-loading>
      


      b) if the web loader is used, then jboss-web.xml can override the tomcat configured default java2ClassLoadingCompliance setting, e.g:
      <class-loading java2ClassLoadingCompliance='true'>
      


      Is this correct?

        • 1. Re: java2ClassLoadingCompliance
          Anil Saldanha Master

          I think the understanding is correct? Test cases will validate it. :)

          • 2. Re: java2ClassLoadingCompliance
            Scott Stark Master

             

            "dimitris@jboss.org" wrote:
            Regarding http://jira.jboss.com/jira/browse/JBAS-3047, I did some adjustments on top of Scott's changes, that I want them to be reviewed.

            They way I understand it is:

            a) To use the jboss web loader, either it has to be configured as the default setting for tomcat, OR a <loader-repository> entry in jboss-web.xml will activate it. In this case the parent/child first classloading behaviour is controlled by loader-repository java2ParentDelegation, and the java2ClassLoadingCompliance flag is ignored, e.g:
            <class-loading java2ClassLoadingCompliance='false'>
             <loader-repository>dot.com:loader=unique-archive-name
             <loader-repository-config>java2ParentDelegaton=true
             </loader-repository-config>
             </loader-repository>
            </class-loading>
            


            b) if the web loader is used, then jboss-web.xml can override the tomcat configured default java2ClassLoadingCompliance setting, e.g:
            <class-loading java2ClassLoadingCompliance='true'>
            


            Is this correct?


            Yes, currently, but you should be able to use either the config you show, or something like:
            <class-loading java2ClassLoadingCompliance='true'>
             <loader-repository>dot.com:loader=unique-archive-name</loader-repository>
            </class-loading>
            

            to create a UCL that is not scoped. There is inconsistent handling of the UCL creation in the LoaderRepositoryFactory for this though. It defaults to a scoped ULR, and requires a ctor that does not exist in the unscoped ULR. The WebIntegrationUnitTestCase.testJava2ClassLoadingComplianceOverrideULR is failing because of this.