2 Replies Latest reply on Nov 10, 2004 2:11 PM by Jay Choi

    updating single war when there are multiple wars in vm

    Jay Choi Newbie

      Hi, all..

      My Application has 4 different war "zones" running on a single JVM
      and there are common library files and all of these archives are
      "exploded" on a $jbossdir/deploy/xxx.ear/...

      I can go and update JSP files without redeploying..
      But when I replace servlet class files or library class files, they obviously
      aren't affective immediately until I restart jboss or change top-level
      DD xml file..

      Is it possible to force jboss to redeploy single war zone without interrupting other war's..?

      Also, is there any hope to change library class without restarting or
      redeploying the whole ear application...??

      We are trying to add reseller zones and they would be sharing same
      components (i.e. libraries) therefore, when we change the library should
      not cause interruption to all of our reseller zones..

      Any help or insight will be greatly appriciated..


        • 1. Re: updating single war when there are multiple wars in vm
          Joan Horta  Tosas Novice

          About your first question, if you "touch" your web.xml file in the WAR exploded dir, then JBoss redeploys that WAR. If using linux, it's easy to do it with the "touch" command; in windows I know there are some free utilities that do this, but don't know where you can get them (a home-made solution would be to edit the web.xml file and force it saving it with Save As command, for example).
          About the second question... Well, it does depend on various factors. If you use interfaces to access your common libraries and the interfaces aren't changed, then I think it's possible to modify them without restarting the dependent WARs, but not really sure of how to make this possible. On the other hand, if you don't use interfaces or your interfaces are changed, then the dependent WARs must be redeployed in order to access the new classes/interfaces.
          Be advised that I'm not really sure about my answers because they are based on the J2EE spec, the JBoss code I could understand and my experience, so I'm sure someone from JBoss can answer better your questions, but maybe my answers helped you someway...

          • 2. Re: updating single war when there are multiple wars in vm
            Jay Choi Newbie

            Hi, Raist.. Thanks for the reply..

            BTW, your first answer didn't work for me..
            here is my dir structure ==> jboss/server/default/deploy/abc.ear/def.war

            when I touched def.war directory nothing happened..
            when I touched the web.xml in def.war directory nothing happened..

            when I touched abc.ear, nothing happened..

            when I touch the application.xml in abc.ear and it obviously redeploy whole applicaition..

            Your second question.. What you do mean by using interface for the common lib..?

            Can you elavorate your suggestion a bit more detail please..??