EAR archive Vs WAR & Jar's

Discussions

General J2EE: EAR archive Vs WAR & Jar's

  1. EAR archive Vs WAR & Jar's (2 messages)

    We can deploy EJB as a JAR file, and create a WAR file that includes the previous JAR and some JSPs (this is enough for deploying applications).

    But we can also deploy as an EAR file. What is the advantage of that?

    could somebody clear me this thing

    Threaded Messages (2)

  2. EAR archive Vs WAR & Jar's[ Go to top ]

    The difference is all in what you are trying to accomplish.

    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.
  3. is EJB the only difference[ Go to top ]

    what if we only using Spring and ORMs? Any advantage for EAR compared to WAR?