Home JBoss howto Configuration How to add a custom JBoss archive in an Ear ?
30 | 07 | 2010
JBoss 5 AS Book
"JBoss AS 5 development" reviews
Please share your feedback/review with other readers!
Banner
Dashboard
Advertise with Us
Banner
RSS Feed
Java EE 1.6 resources
Login
Sign here for the NewsLetter.



JBoss admin resources
Banner
Java EE 1.6 resources
JBoss howto

How to avoid the 50 seconds start up limit in Eclipse ?

JBoss recipe of the day ...
Read More

How can you solve deployment errors caused by large war/jar/ear files ?

jboss recipe of the day ...
Read More

How do you configure your .war to be deployed after your EJB ?

jboss recipe of the day ...
Read More
How to add a custom JBoss archive in an Ear ?
Written by Mark S.   

jboss recipe of the day
JBoss custom archives (like .sar or .har) are not recognized by the application.xml descriptors, so in order to deploy them in an EAR you have to declare them in jboss-app.xml. This file is located in the META-INF folder of your EAR.

For example, if you want to include an Hibernate Archive (HAR), you have to provide the following jboss-appl.xml configuration:
 

<jboss-app>
   <module>
      <har>sample.har</har>
   </module>
</jboss-app>

If you want to provide a .sar archive then you would need:

<jboss-app>
  <module>
    <service>sample.sar</service>
  </module>
</jboss-app>

You can also add a web application module configuration, which will override the default EAR configuration:

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

JBoss.org Search
Custom Search
Comments
Search
Only registered users can write comments!

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."