The WAR file is for deploying web applications, thus the name Web Application aRchive. This is for when you want to allow HTTP(S)/WML/VXML clients to connect to your application through the typical internet domain. Your web application acts as a delegate (think Business Delegate or Session Facade inside your business tier) to your EJB. You can deploy multiple EJBs, via JAR files, inside your one WAR file.

The EAR file is for deploying your EJB as standalone, or separate from your web application. In other words you don't need a web application to be running for a client to access your EJB as an enterprise service. You are exposing the EJB to clients, more than likely through an EJB client JAR you have provided for them.

TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations technology projects - with its network of technology-specific websites, events and online magazines.