We are building a new Spring supported application, and our product team is having a little debate about how to implement a certain aspect of our design, and I wondered if anybody here could offer any advice, insight, or anecdotes.
The project is basically a hub with multiple interconnected components. The hub is deployed as a WAR, with each component added (at runtime or during install) as a JAR loaded in its own ClassLoader. These JARs will not all be written by us.
Plan A:
All the common functions of the components are abstracted out and built in the WAR, leaving only component specific code in the component JARs. Cleaner code IMHO, but upgrades require a new WAR deployment.
Plan B:
Some or all of the common functions of the components are reimplemented in every JAR. Fugly code IMHO, but allows some functional upgrades without downing the entire application.
So two questions:
1. Which Plan would you choose, and why?
2. Any gotchas when using custom ClassLoaders under Spring?
Thanks in advance


Reply With Quote