For an application provider system I need to deploy a large number of instances of the exact same application. The wiki has suggestions for installing multiple jboss servers on a single box, but I would expect that what I need is to install multiple instances of my application into a single jboss server instance on a single box. This raises a couple of questions:
1. Can JNDI clashes occur?
From what I have read JBoss uses a single JNDI tree per server. My problem is I have a large number of Swing clients that connect to each their own application instance. They communicate with the server side through session beans which they look up using JNDI, but I expect this will not work once I have multiple applications, since each application will attempt to register its own instances of the session beans on the same JNDI address.
So what I would like to know is this: Am I forced to deploy each application's session beans with different JNDI names and write special client code which looks for the application specific JNDI names? Could anyone comment on whether that way is a good way? Are there any alternatives?
2. Can I expect a performance gain?
The reason I want to deploy all the application instances into the same JBoss instance is I expect it to perform better. If I gave each application its own JBoss instance I would expect this would consume much more RAM and take a lot more CPU time as well. On the other hand I am using class loader isolation so each application has its own class loader - this means that each application will have its own set of classes, so no RAM saving there. Has anyone got any experience with single JBoss vs. multiple JBoss performance and RAM consumption?
3. Is multiple JBoss server instances a viable alternative?
If we are to run 10, 25 or 50 applications per box is it *at all* a reasonable alternative to run a JBoss server instance per application instance? Has anyone ever installed 25 JBoss instances on the same box?
If anyone has any thoughts, views, experiences or hints I would be very happy to hear from you.