just to be clear you have an app.ear and you want to deploy multiple copies of this? Or do you have multiple .ear files?
I have one .ear file and want to deploy multiple separate copies of it.
(jboss 3 or 4)
I'd suggest precompiling all your jsps, deploying all the classes from your entire app first, and then deploying an ear for each copy that contains only the deployment descriptors for the app, including the datasource deployments stuff. Remember that some things have to be unique accross the whole jboss server, such as jndi names and ejb names. (and mbean object names). If you have something like different pictures for each app copy I'm not sure how to handle them.
Thank you for your suggestion, but I do not think that will work.
One feature I have is that it is possible to upload .jsp pages into the system while the system is running. So I can not precompile all of my jsp pages. The once that I know about is precompiled. The second problem is that I generate my deploymentdescriptors and also the getHome methods using XDoclet. So I can only have one JNDI name for each ejb.
Is it possible in some way to tell a CMP bean wich database to look into on the fly. What I am thinking of is that if I could deploy my ear only once, but create several instances of my database tables within the same database server. Then I could tell the CMP bean which database to look into on the fly. It is possible for me to know which database I should look into if the CMP beans can be configured that way.
It is OK for me to have only one instance of the .ear file. What is important is to have several instances of my database tables.
If this is not possible I guess I will have to have several separate JBoss instances running on one computor, with several Jetty-servers listening on different ports?