I have an EAR that contains a WAR and HAR. The HAR only contains the hibernate-service.xml which looks like this:
<server> <mbean code="org.jboss.hibernate.jmx.Hibernate" name="test.messaging:name=MessagingSessionFactory"> <attribute name="DatasourceName">java:/MySqlDS</attribute> <attribute name="Dialect"> org.hibernate.dialect.MySQLDialect </attribute> <attribute name="SessionFactoryName"> java:/hibernate/MessagingSessionFactory </attribute> <attribute name="CacheProviderClass"> org.hibernate.cache.HashtableCacheProvider </attribute> <attribute name="ShowSqlEnabled">true</attribute> <attribute name="ScanForMappingsEnabled">true</attribute> </mbean> </server>
2007-09-07 09:11:30,627 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: tmp3596messagebrokerpersistence.har
BTW - Using Hibernate 3 and JBoss 4.2.1