2 Replies Latest reply on Oct 16, 2002 10:13 AM by jkatilie

    Packaging RAR's in a EAR

    jkatilie

      We have a number of Web Applications (.war) and ResourceSource adapters (.rar) that we want to package and ship together. If we package the archives as is in a .ear things seem to run ok. What we want to do is move common jar files from the .war and .rar files into the root of the .ear so the structure would look something like:

      common1.jar
      common2.jar
      webapp1.war
      webapp2.war
      resadp1.rar
      resadp2.rar
      META-INF\application.xml

      This structure seems to work fine with the web applications (I.e. the code in the common jar files are visable/loadable by the web apps but the ResourceAdapters results in ClassNotFoundExceptions for code in the common jars. This is reported to work with other appservers but not with Jboss. We are Running 3.0.1. In reading various documents concerning J2EE and JBOss class loading i'm not sure if this should work.

      Is anybody doing something similiar? Should this .ear structure work under Jboss and other J2ee App servers?
      As always any comments/suggestion are appreciated.

      Thanks, John Katilie

        • 1. Re: Packaging RAR's in a EAR
          davidjencks

          I think you have to tell jboss you want those jars loaded in the jboss classloader (rather than the web classloader).

          You might be able to make this work by referencing the jars in the .rar manifest classpath.(NOT the .jar inside the .rar's manifest classpath)

          • 2. Re: Packaging RAR's in a EAR
            jkatilie

            David, Thank you very much for your suggestion. Yes, its seems to work if the manifest in the rar file contains classpath entries refering to common jars in the root of the ear file. I'm not totally done yet but it looks very promissing! FYI, It did not work if we also had a jboss-app.xml file like:

            <jboss-app>
            <loader-repository>some.dot.com:loader=fresno.ear</loader-repository>
            </jboss-app>

            But that does not really concern me. I think.

            Thanks again... John Katilie