Using JBoss 7.1.1 Final.
We have 2 applications deployed - one of them is packed as an EAR and the other one is packed as a WAR.
The app packed inside the EAR serves as our core app holding the EJBs and other systems (such as Quartz Schedulers, MDBs, etc) while the app packed in the WAR serves as the presentation (view) app.
The WAR is calling EJB's on the EAR and this one will return some configuration classes to the WAR (configuration classes that are defined - packed - in the WAR).
The process would be the following:
1.) Request comes in from WAR
2.) Request is processed inside a Groovy based rule engine in the EAR app (here the classes to be returned are known for we are using a custom groovy classloader that can be dynamically modified)
3.) When the EAR is trying to marshall the classes (returned by the execution of the rules from the Groovy engine) for returning them to the WAR caller it fails to do so because the EAR classloader is unaware of those classes
In JBoss 5.1.0 this does not happen since (I presume) the classloader would be unified and the EAR classloader would be aware of the classes packed in the WAR.
In JBoss' 7.1.1 modular classloader this no longer applies. I did manage to solve this problem by declaring a dependency between the EAR and WAR thus the classes in the WAR would be visible to the EAR and all worked as expected.
The problem is that on JBoss 5.1.0 we do use quite a lot the hot-deploy feature for the WAR ... this one being the subject of somewhat frequent changes and is often redeployed without stopping the server.
In JBoss 7.1.1 we don't have the possibility of hot-deploying the WAR anymore since redeploying it would mean the EAR will also be un-installed (due to the dependency declared between the two) and this is something we do not want since the EAR is running core services for our platform (like message handling/processing).
How can we have the hot-deploy of the WAR still available while keeping the EAR online at all times ?
I had hoped that there are some MBeans that would allow me to dynamically inject at runtime the jars I need into the EAR classloader but I have not found such.
Another option I've considering is modifying the classloader so that it would allow me to add/remove (at runtime) the configuration classes but I do not know if this is feasible and how long would such a task last.
Any ideas on this topic are welcome.