This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I would like to deploy two identical applicaitons on one instance of JBoss. One for development connected to it's own datasource, and one for production connected to the production datasource. The trouble is of course is that the session beans all get the same JNDI string.
I've looked at two instances of JBoss on the same machine, looks messy, other than the cloned ip for the machine. Also looked at swapping the datasource on the fly, but that means development and production can't run at the same time, which is not an option. And of course two virtual operating systems on the same machine, not the VMWare type but the partition type, which also seems messy.
I suppose that two ears seems to be the best option. Trouble is that how will the client connect either to application one or application two bean if they are both called ApplicationBean? This seems like a conundrum.
Has anyone done this? Please share your wisdom great sage.
We have two JBoss instances running in production which are not on the same machine.
One machine is my beast and the other is another developer's. I use his to test new features which I point the DAO's to a staging environment. This way I don't interfere with what is currently running in production. I don't think you could get away with it without many aches and pains. Mainly because of the classloading mechanism JBoss uses. Basically it shares all the classes within each deployment. Which would mean in your case it's gonna get confused by the two deployments on the single instance.
Check my next post. It sorta deals with the problem.
Yep, read your jar loading problem which is related, Graham.
No solution there, JBoss finds two objects with the sme name in two different but identical applications and doesn't like that at all.
The light at the end of tunnel has been turned off. I will gracefully bow out of this line of thinking, and follow the less travelled road. Specifically I will reconfigure the core, which means decoupling the relationships between the Pojos and the tables and of course each other.
I owe, I owe, it's off to work I go.
Joined: Dec 30, 2004
I'm not sure if this will fix your problem, but, I was able to achieve ear isolation by adding the following to my ear deployment:
Note: the myapp and I believe the myapp.ear should be unique names.
Here's what I gather. The ear is not fully isolated, meaning, it can still use other classes that have been deployed elsewhere or that exist on the server. However, JBoss will first look for the classes within the ear and if found use them. Which creates the ability to deploy application specific modules.
Graham [ October 04, 2006: Message edited by: graham king ]
Joined: Nov 15, 2003
Thanks for that, I think I am going to give it a twirl in fact!