Friday, February 11, 2011

Create your first EAR file

What and all you ear file can have?

For example, it can have Jar (Java Archive), War (Web Archive) and Sar (Service Archive). Jar file has all class files. War has the directory structure as below

WEB-INF------------->classes   -- All client classes are bundled here
WEB-INF-------------->lib  --- All client side dependent jars are bundled here
WEB-INF -------->web.xml ----> web deployment descriptor

It could contain struts bean configuration file or spring controller configuration file based on the technology you are using.

Sar files are Service Archive files where it has service configuration files. For example jboss application server has jboss-service.xml as service bean configuration file. My Sar has the below directory structure

Sar
    --------> SearchService.jar     (it has all service related beans)
    ---------> META-INF ----> jboss-service.xml (it has service bean configurations)

Complete ear has the below directory structure

ear
    -------> SearchService.sar
    --------> job.war                      
    --------->META-INF/application.xml
    --------->META-INF/jboss-app.xml

where application.xml has entries for job.war and jboss-app.xml has entries for SearchService.sar










No comments:

Post a Comment