10/13/2009

A sample application.xml (Java EE 5 and Java EE 6)

The following is a sample application.xml that declares 3 modules (application client, ejb jar, and war), and a library directory. The library-directory element is redundant here since the default value is "lib".

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">

<module>
<java>test-client.jar</java>
</module>

<module>
<ejb>test-ejb.jar</ejb>
</module>

<module>
<web>
<web-uri>test.war</web-uri>
<context-root>test</context-root>
</web>
</module>

<library-directory>lib</library-directory>
</application>

Java EE 6 application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="6" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd">

<application-name>test-app</application-name>
<initialize-in-order>true</initialize-in-order>
<module>
<web>
<web-uri>test-web.war</web-uri>
<context-root>test</context-root>
</web>
</module>

<module>
<ejb>test-ejb.jar</ejb>
</module>
<library-directory>lib</library-directory>
</application>

3 comments:

Unknown said...

Great and Useful Article.

Online Java Training

Java Online Training India

Java Online Course

Java EE course

Java EE training

Best Recommended books for Spring framework

Java Interview Questions








Java Course in Chennai

Java Online Training India

Unknown said...

I enjoyed on reading your blog post. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. Please visit my website, Friv 4000 Games is where all the free friv games.
Friv 4000

Susan said...

Useful information. Fortunate me I discovered your web site by accident, and I am stunned why this accident didn’t came about in advance! I bookmarked it. If you're looking for the best Things to do in the world, this list has something for everybody! From adventure to culture, food to history .