[jboss-user] [Installation, Configuration & DEPLOYMENT] - Deploying multiple instances of an application using <virtua

genesisst do-not-reply at jboss.com
Mon Sep 10 09:08:41 EDT 2007


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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082597#4082597

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082597

More information about the jboss-user mailing list