1 Reply Latest reply on May 9, 2004 3:09 AM by Tomer ben david

    loader-repository, is it a must for me?

    Tomer ben david Novice

      Hi

      I have multiple wars (no ear) that im deploying to the same jboss-tomcat server
      They have web-inf directory and in their web-inf/classes , they have the same class

      a.war / web-inf / classes / common.class
      b.war / web-inf / classes / common.class
      c.war / web-inf / classes / common.class

      I have noticed they all used the same class that was loaded by the same classloader!

      Therefore I used this


      <jboss-app> <loader-repository>some.dot.com:loader=a.ear</loader-repository></jboss-app>
      <jboss-app> <loader-repository>some.dot.com:loader=b.ear</loader-repository></jboss-app>
      <jboss-app> <loader-repository>some.dot.com:loader=c.ear</loader-repository></jboss-app>

      within ear's that I created for them and it fixed the problem.

      is it a must? can't I have multiple war's with the same jar in their web-inf/lib or same classes in their web-inf/classes without creating a top ear for them with jboss-app such that they would be loaded by multiple class loaders?

      Thanks

      Tomer

        • 1. Re: loader-repository, is it a must for me?
          Tomer ben david Novice

          Its OK I think im finding the solution....
          I will try it i think its going to solve my problem ...

          http://sourceforge.net/docman/display_doc.php?docid=16524&group_id=22866

          "
          Support for specifying custom loader repositories has been extended to SARs, EJB jars and WARs in addition to EARs. In addition the loader repository configuration allows for child first class loading rather than the parent delegation model. This allows deployments to override classes from the server level. To enable deployment first class loading use a configuration fragment like:

          <loader-repository>
          jmx-domain:prop1=value1,prop2=value2,...
          <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
          </loader-repository>

          in the jboss-app.xml, jboss.xml, jboss-web.xml or jboss-service.xml descriptor. See the corresponding descriptor DTD in the docs/dtd directory for more details.
          "