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.
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.
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.
Which Plan would you choose, and why?
Thanks in advance
Taking all of the common functions and consolidating them to one JAR isn't an option?
Yes, basically that's option A, if we compiled to a JAR and added the JAR to the WAR instead of just compiling to classes and stuffing the classes in the WAR.
I think erik's direction is right , have ur common interfaces,abstarction is a common.jar. All ur component jars and the wars could have a dependency to that common jar.