3 Replies Latest reply on Feb 17, 2010 11:29 AM by peterj

    running 2 identical applications under the same server

      Hi y'all,

      I need to run the same application twice (concurently) on the same Jboss.

      The 2 apps should differ by port or application name, but they should come from the same directory tree.

      I wouldn't like to compile 2 differenmt applications. but would ask for the simplest and quiqkest.

      Would appreciate any heelp or directioon.

       

      Sinceely

        • 1. Re: running 2 identical applications under the same server
          peterj
          What kind of application? If a WAR, then simply rename the file and deploy again. Example: someapp.war, otherapp.war
          • 2. Re: running 2 identical applications under the same server

            thanks peter, this works partially for me.

            the issue is that the main application is indeed a WAR file.

            however, this WAR uses external JARs loaded also with server start.

            even though the WAR and JARs are located in different directories, when the second WAR loads, it tries to load the JAR files, which are already loaded from the startup process of the WAR in the aforementioned directory.

            when this happens, the log issues errors and says the JAR files are already registered and the server does not load the second instance.

            is there a way to fix this without going into class loaders?

             

            thanks again,

            moshe

            • 3. Re: running 2 identical applications under the same server
              peterj

              I have had mulitple apps use common JARs located in the lib directory without any issues. What is it about your apps that is different? And what do you mean by "when the second WAR loads, it tries to load the JAR files" - this sounds to me like you are already using classloaders.

               

              By the way, a simple quick fix might be to package the common JARs in your WAR. If youare really wanting to load the JARs twice, then the only "waste" this introduces is additional disk space (and disk is cheap!)