Search code examples
jakarta-eestrutsmaven-3jboss7.xear

Deploying multiple wars for different modules but same portal


I have a legacy project which is struts based (1.2) and deployed on JBOSS AS 7.

The project started off small several years ago catering to one single product but now has several sections in it. We want to break them into maven modules and generate separate wars out of it and deploy them - so that whichever module needs changed will be re-released using the Jboss Management console.

Idea was to package all modules as self-sufficient wars in a EAR and deploy. However I see if I package all in an EAR there is no way one can hot-deploy a part of it i.e. a single war in it. Is it even possible with an EAR?

Also all the module would have a common Login front end - Is there a way to a common Login-Only war which can then redirect to other wars while maintaining a session?


Solution

  • You can create expoided archive, so you can update war per war or any lib/*jar file idependently.

    You should look here to know how to trigger deployment of explodeded archive.

    But this will be trigger as one app and the entire ear will be re-deployed each time you made a modification. (There is no real hot deployed required by specs)

    The other option is to put the depedency in different JBoss module (example here) then you can have idependent wars with the shared jar in the modules. But it will be complete different app, you won't be able to have shared EJBs or CDI bean between the different applications.

    This answer have more details about module used to handle shared depedencies.