Using a HAR File Inside an EAR File
A Hibernate archive can be deployed as a top-level package, or it can be deployed as a component of an EAR file. Because Hibernate archives are not a standard J2EE deployment type, you need to declare them in the jboss-app.xml file of an EAR file in order to use them in that context. You do this by using a module/har element, as shown in the following example:
<!DOCTYPE jboss-app PUBLIC
"-//JBoss//DTD J2EE Application 1.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
<jboss-app>
<module>
<har>caveatemptor.har</har>
</module>
</jboss-app>
With this, a Hibernate archive can be deployed alongside a WAR or EJB JAR file in any EAR file.
 |