I have an EAR that contains one WAR and one EJB. It deploys and runs fine in JBOSS 5.1.
I want to be able to deploy multiple versions of that ear into one jboss instance. Like say, I have TestProject.ear. It's running fine in jboss, and I do further development on my TestProject.ear. Maybe make some changes to the ejb, etc. I want TestProject.ear 1 and TestProject.ear 2 to both be deployed and be able to access each one seperately.
I've tried searching about this without much luck.
I tried setting Isolated = true in my ear-deployment-...xml and trying to get just one ear working but after I changed that, my app would deploy but not run. It would fail with this error:
Exception Details: java.lang.LinkageError
loader constraint violation in interface itable initialization: when resolving method "org.eclipse.persistence.internal.jpa.EntityManagerImpl.lock(Ljava/lang/Object;Ljavax/persistence/LockModeType;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/eclipse/persistence/internal/jpa/EntityManagerImpl, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for interface javax/persistence/EntityManager have different Class objects for the type javax/persistence/LockModeType used in the signature
I then put that back to false, and tried adding this:
in my jboss-app.xml
Interestingly, it failed with the same error as the above.
If I just undo that, I deploy as before when it was working, and I have two of the same ears, just named different like TestProject1.ear and TestProject2.ear (But they are really the same ear) and start jboss, one of them will work and the other will fail with the following:
Deployment...is in error...IllegalStateException: jboss.web.deployment:war=/TestProject-war is already installed.
If I set in the application.xml the context root to different things like one is /1/TestProject-war and the other is /2/TestProject-war, both will seem to deploy but with an error that the TestProject-ejb has already been registered or something like that.
Then if I run one of those it works fine, the other will fail with an error when I try to run it: exception java lang illegalargumentexception object not instance declaring class.
Is what I'm talking about even possible? Am I anywhere near the right track on this?
I'm very new to JBOSS, so any help is much appreciated! Thanks!