I'm working on an application that can get monolithic in size. I'd like to break the app up into modular web components, and package them together as needed.
For instance, let's say I have the following web projects:
web-app-main.WAR
web-app-feature-1.WAR
web-app-feature-2.WAR
web-app-main.WAR will contain all beans and pages that are common for any deployment. Now let's say I have a Client #1 that has paid for web-app-feature-1.WAR, and Client #2 paid for both. I'd like to have the following:
Client #1
EAR
web-app-main.WAR
web-app-feature-1.WAR
ejb-client1.JAR
Client #2
EAR
web-app-main.WAR
web-app-feature-1.WAR
web-app-feature-2.WAR
ejb-client2.JAR
I need both feature WARs to simply act as extensions to the main WAR. That would mean that any JSF navigation & pages, or controllers, session data, etc, would be available to either of the feature WARs, and vise-versa. Additionally, the whole issue of the context-root rises up.
As I understand it, what I want to accomplish is not possible. How would you solve this problem?