I'm using a SAR inside an EAR in my webapp. The SAR's jboss-service.xml looks like this :
<mbean code=HibernateService" name="jboss.jca:service=HibernateFactory,name=HibernateFactory"> <!-- Make it deploy ONLY after DataSource had been started -->
<attribute name="MapResources"> conf/base/Category.hbm.xml, </attribute> <attribute name="JndiName">java:jboss/HibernateFactory</attribute> <attribute name="Datasource">java:jboss/datasources/DS</attribute> <attribute name="Dialect">org.hibernate.dialect.SAPDBDialect</attribute>
<attribute name="ShowSqlEnabled">false</attribute> <attribute name="UserTransactionName">java:jboss/UserTransaction</attribute> <attribute name="JdbcBatchSize">0</attribute>
<!-- Transaction integration --> <attribute name="TransactionStrategy">org.hibernate.transaction.CMTTransactionFactory</attribute> <attribute name="TransactionManagerLookupStrategy">org.hibernate.transaction.JBossTransactionManagerLookup</attribute> <attribute name="FlushBeforeCompletionEnabled">true</attribute> <attribute name="AutoCloseSessionEnabled">true</attribute>
<!-- Fetching options --> <attribute name="MaximumFetchDepth">5</attribute>
</mbean>
At JBoss startup I get :
Could not build SessionFactory using the MBean classpath - will try again using client classpath: resource: e.hbm.xml not found
My hbm.xml files are in the same SAR ( /conf/*.hbm.xml).
Any help ?
Thanks.
|