2 Replies Latest reply on May 19, 2005 1:51 PM by sbudewig

    Isolating web contexts in different EARs

    sbudewig

      Hi,

      We are running clustered JBoss AS 4.0.2RC1 and IBM JDK 1.4.2 on AIX. We have web context "/A" in 1.ear and web context "/B" in 2.ear, each of which deploy w/o issue from the all/farm directory. There is a Z.class which is in the WAR of each ear ( same name in both EARs ). After both applications have been deployed, they both use the same Z.class ( from the app loaded FIRST ).

      With this implementation, the Z.class loaded second will NEVER be run. Is this a bug? How do I keep classes in different applications from being able to call one another?

      Regards,

      Stephen

        • 1. Re: Isolating web contexts in different EARs

          Not quite clear on what you want. But sounds like you need a scoped class loader?

          -Ben

          • 2. Re: Isolating web contexts in different EARs
            sbudewig

            I'd like to be able to deploy many different EARs [with different contexts] to the same JBoss server and have Z.class be loaded for the EAR/context of that application.

            The reason for this may be different applications ( EAR ) that reuse a class, but have different versions of that class. A method may work differently from one version to the next. My client has applications that they don't want to change for a while, but they want to change other applications ( EAR ) that reuse the same classes ( Z.class ). When the changed application ( EAR ) gets loaded, it doesn't work as expected when loaded with the applications ( EAR ) that use the previous version of the class ( Z.class ).

            So, a context-sensitive class loader may be what I'm needing. How do I get that class loader to be used?

            Thanks,

            Stephen