0 Replies Latest reply on May 29, 2007 12:14 PM by Ignacio de Cordoba

    How to make a .ear use an expanded war classloader

    Ignacio de Cordoba Novice

      Hi there,
      I have the following scenario in my webapps:

      - .ear file with EJBs (2.1 & 3)
      - expanded war file with the web interface.

      I don't include the war in the ear file because in development moment I change many thin in JSPs / struts XMLs /...

      JBoss configuration

      What is the ClassLoading configuration to make both the .ear EJBS and the webapp search classes before in /WEB-INF/lib than in the .ear file class loader?
      I need this because for historical (wrong aprox., of course) reasons, the EJB returns classes that implement some view layer classes, and so I don't want them to be part of the ear file. I have too much code written this way as I used to use Unified Class Loader. My problem now is than I haven't found a way to "mix" both class loaders and so any class retured from the business layer will give ClassNotFound exceptions when used in the presentation layer. (Also, EJB3 POJOs throw ClassCastException). This is solved by packaging the war inside the ear, but I cannot do that.

      I am changing properties in the following files:

      1) conf/jboss-service.xml set NamingService CallByValue to true
      2) deploy/ear-deployer.xml set Isolated and CallByValue attributes to true.
      3) deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml set Java2ClassLoadingCompliance and UseJBossWebLoader to false

      4) /WEB-INF/jboss-web.xml
      5) /META-INF/jboss-app.xml


      Thanks for any help.