I've been trying to post this as a reply to a thread without success so now I post it as a new thread instead. Please refer to http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ for more info
I've been searching the forums on this issue as I have a couple of applications packed in .ear files which shares some common ejb's but which needs to run with different configurations. I'm using xdoclet to generate the ejb deployment desctiptors from the source code so having to manually go through and edit the jboss.xml deployment descriptors would be a lot of work.
Obviously if I try to deploy two of my ear's into the same jboss instance I get an InstanceAlreadyExsistsException because the first deployed has already bound to the name in the global namespace. I find this behaviour and the solution to manualy having to prefix the name with the instance wrong, it should either be prefixed automatically with the name of the .ear or at least there should be an option to set jndi-context in the jboss-app.xml file that is prefixed automatically to all jndi names in the .ear-file.
Since Jboss 3.0 there is a possibility to use the loader-repository tag to handle the classloading issue on deployment of different versions of an ejb in different .ear's but the jndi global namespace problem prevents different versions of the same .ear packaged application to run side by side.
I saw someone mentioning that Orion handles this issue properly eventhough I haven't had the opportunity to test it myself.
Have I missunderstood it or is this really the way things should work? I would be happy to assist in resolving the problem if someone can help pointing me in the right direction since as it works today it prevents me from running JBoss for real applications.