0 Replies Latest reply on Sep 10, 2007 9:08 AM by Sebastien Tardif

    Deploying multiple instances of an application using <virtua

    Sebastien Tardif Newbie

      Hello,

      I am a newbie concerning JBOSS, so please bear with me if I seem a bit non-knowing. Also, I have search a bit on google and in forums for help on my issue, but wasn't successful.

      Like the title says I have to deploy multiple instances of a single application on the same JBOSS instances. This works well, if I deploy multiple JBOSS instances, but since we want to conserve system resources, we must do it on a single JBOSS.

      To complicate matters, we do not own the application code and they hard-coded context paths as "/theapp/etc". They do no use the context path. So we can't use a different context for each, such as "/instance1/theapp/etc".

      Also, the application is bundled in a EAR containing multiple WAR.

      So I went the virtual-host way, but I am not entirely successful. I basically want instance1 to be bound to http://instance1/theapp/etc" and instance2 to http://instance2/theapp/etc".So here's what I did:

      1) add instanceX to "/etc/hosts" (or rather in its Windows equivalent)
      2) add to Tomcat's server.xml
      3) For each WAR, I added <virtual-host>instanceX</virtual-hosts> in jboss-web.xml.

      So my first question is about validating that this is a correct route to do this. If not, I would greatly appreciate information on the best way to achieve this.

      Also, the first problem I have is that as soon as I log in, I get a session timeout and get logged of. But this can easily be an application problem and not JBOSS related. Note that at this time, I only have a single instance of the application.


      The second problem is when I try to add a second instance, I get a lot of javax.management.InstanceAlreadyExistsException. I tried using the Isolated of the EARDeployer, but then I get a lot of other errors about other stuff not being available. Furthermore, I can't login to the first instance anymore. I can see the login page, but I can't an invalid user instance of the session timeout error.

      Thank you very much for any help that can be provided.