상세 컨텐츠

본문 제목

WAR, EAR 차이

Oracle/Weblogic

by 야솔아빠 2016. 5. 20. 10:33

본문

반응형

WAR (Web Archive) is a module that goes into web container of Java EE application server. A JavaEE application server has two containers (runtime environments) - one is a web container and the other is a EJB container.

The Web container hosts web applications based on JSP/Servlets API - designed specifically for web request handling - more of request/response distributed computing. Web container requires the web module to be packaged in WAR file that is a special JAR file with a web.xml file in the WEB-INFfolder.

EJB container hosts enterprise java beans based on EJB API designed to provide extended business functionality such as declarative transactions, declarative method level security and multiprotocol support - more of RPC style of distributed computing. EJB container required EJB module to be packaged in JAR file having ejb-jar.xml file in META-INF folder.

Enterprise application may consist of one or more modules that can either be Web modules (packaged in WAR file) or EJB modules (packaged in JAR file) or both of them. Enterprise applications are packaged in EAR file that is a special JAR file containing an application.xml file in the META-INF folder.

Basically EAR file is a superset containing WAR files and JAR files. Java EE application servers allow deployment of standalone web modules in WAR file though internally they create EAR file as wrapper around WAR files. Standalone web container such as Tomcat and Jetty do not support EAR files - these are not full fledged application servers. Web applications in these containers are to be deployed as WAR files only.

In application servers - EAR file contains configuration such as application security role mapping, EJB reference mapping and context root url mapping of web modules.

Apart from Web modules and EJB modules EAR files can also contain connector modules packaged as RAR files and Client modules packaged as JAR files.



Reference :  http://stackoverflow.com/questions/1594667/war-vs-ear-file

반응형

'Oracle > Weblogic' 카테고리의 다른 글

spring boot application deploy to weblogic 12C  (0) 2017.10.21
WebLogic Spring 연동시 주의사항  (0) 2016.07.13
maven build to the WebLogic 12c  (0) 2016.05.11
Weblogic wlst gc  (0) 2014.03.21
JMS queue load balance 설정  (0) 2014.03.10

관련글 더보기

댓글 영역