5

We currently run two separate webapps (WARs) deployed in one single EAR containing additional JARs and settings. To improve our deployment I want to split one of these webapps into different modules that may be build and packaged individually. But I've currently no clue on how to package these modules so that I'm able to add or remove them as desired - at best during runtime.

The webapp is getting more and more complex and I'd like to separate some of the functionality into modules. These modules should be packaged as single archives. As long as they contain only classes and resources loaded through code I know how to do this (simple JARs). But how about JSPs? Normally a WAR file contains JSPs or HTML files. I my case it are JSF pages utilizing JBoss Seam and RichFaces.

These modules will add classes, resources and JSF pages and other includes to the running webapplication. Is it somehow possible to deploy them as individual archives to serve the same running webapp?

We are using Maven for our build and packaging and deploy into JBoss v4.

Daniel Bleisteiner
  • 3,190
  • 1
  • 33
  • 47
  • What you are asking goes beyond the capabilities of JavaEE deployments. You *could* consider a next-gen container like Spring dmServer, if you really want this sort of stuff. – skaffman May 10 '10 at 07:34
  • Some internal discussion revealed the possibility to use Java coded JSF elements instead of XHTML files. For example a module could implement something like public HtmlPanel getHtmlPanel(); But this means we'd have to convert several (50+) existing xhtml files into code. I'd like to avoid that. – Daniel Bleisteiner May 10 '10 at 08:01

1 Answers1

1

Simple way of doing it is to put the JSPs of different modules in different folders and the JSPs which are used commonly in all modules can be kept in the root.

Now if you want to unload a module, remove the corresponding folder.

Hope this helps.

Ravindra Gullapalli
  • 9,049
  • 3
  • 48
  • 70
  • That's a possible way to handle it... but in a large and complex project with a separate hoster involved in deployment it can't be handled safely and therefor is not practically. Thanks anyway. – Daniel Bleisteiner May 17 '10 at 11:51
  • Nothing new here yet... only the idea mentioned in my comment at the original question. I'm handling many things parallel right now and hope to find some more for this topic during this week. – Daniel Bleisteiner May 17 '10 at 15:51
  • Since this thread seems dead I've accepted your solution. If I should find out anything new I'll update this topic again. Thanks. – Daniel Bleisteiner Aug 15 '10 at 16:00