multiple WARs/EARs for a web application

Posted on 2010-08-18
Last Modified: 2013-12-02
I support a web application that consists of multiple modules. Each module is accessed via menu and modules may require to interact with each other to complete a particular transaction.
I want to understand if it is possibe and feasible to create a separate WAR file and treat each module as a stand alone web application. Then using some method make it possible for  modules (which are separate stand alone application) to talk to each other to complete the transaction.

If it is feasible, will there be any impact on the performance? Will the impact be significant?
Question by:javaCaravan0
  • 2
  • 2

Author Comment

ID: 33477519
still waiting for the feedback
LVL 33

Expert Comment

ID: 33508272

You can split up the business logic in the way you describe. The separate modules can even be deployed to different servers.
However, the modules cannot share objects in this scenario. They will have to communicate by web services, either synchronous (via http) or asynchronous via queueing/messaging. This raises the questions of security, transaction integrity, governance and some more.  
Also, your deployment is likely to become much more complex.

Despite the shortcomings, this very well may be the way to go. Application componentization is what SOA is all about :)


Author Comment

ID: 33510097
Thanks for the reply.
Let me clarify what you have explained above:
1. The only way for diffrent modules (designed as a stand alone web application) to interact with each other is via Web Services.
2. can you please elaborate more about your comment on security, transaction integrity and governance. Does web services not provide good security?


Expert Comment

ID: 33608821
I believe if you use an EAR file, you can share the objects & classes between the WARs and other java resources without issues.  A little more information on EAR in general is here in the wikipedia article.  If you were wanting to share objects between EARs, I think that would be when you would have issues as described above. 
From what I understand, an EAR file with multiple WAR files within it should meet your needs.  There may be some performance hit from the general overhead of breaking out the application into a more distributed fashion (more XML to parse, extra classes getting everything loaded) but probably nothing significant and likely well worth it to get the separation that you're hoping to achieve.
LVL 33

Accepted Solution

shalomc earned 500 total points
ID: 33616932
forgot about this thread :)

> 1. The only way for diffrent modules (designed as a stand alone web application) to interact with each other is via Web Services.
Well, it is not the ONLY way, but probably the best and most cost effective way.

As for security, integrity and governance:
When all the business processes ran in a single CPU, you
a. had no security authorization problem because the interfaces were internal and you trust internal processes.
b. had no security data leakage problem because internal processes do not use the network to communicate.
c. had no integrity problem because internal processes are usually complete and it is difficult to inject anything foreign into them.
d. all internal processes tend to fail together, so you do not have to manage SLA for each and every one.

When you split business logic among different components,
a. the interface is external and you have to ensure proper authorization, entitlement and authentication.
b. the data runs on the wire and can be sniffed.
c. due to network "noise" and disruptions the message can be incomplete, and things like proxies and IPS enable injection and modification of data on the wire.
d. it is common for a single module to fail while others did not, this must be taken into account.

These issues have solutions, but the thing is that they have to be addressed explicitly. web services  do not deal with any of these issues by default.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xss alert in domino url 9 57
How to use NFS (Network File System) in mvc 5? 4 59
Show MP4 file and close (HTA) 3 24
SQL to JSON 14 40
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question