Just thinking about how we might implements EARs in conjunction
with Tomcat. It seems there are two approaches.
One is to write a MBean that would get (via parameters, System
properties, etc.) three directories: the Tomcat home, the jBoss home, and
the EAR location. Then it would run early, and unpack an EAR and put the
WARs in Tomcat's location and the EJB JARs in jBoss's location. Then
Tomcat and jBoss would start as normal.
This would probably be pretty expedient, but less helpful in the
long run. Since we don't keep all the stuff from one EAR together, it
would be hard to provide a unified ClassLoader, consistant reloading
behavior, etc. Also, it looks like with Tomcat you'd have to manually
delete the expanded directory tree before you could redeploy.
The better but harder approach seems to be to have both jBoss and
Tomcat read everything they need out of the EAR in place, or at a minimum
unpack it into a single directory and have them read it from there.
However, I suspect this would require some extra coding on both sides to
get it up and running. On the other hand, while you're working on that,
you can also be integrating ClassLoaders and so on.
Any thoughts?
Aaron