3 Replies Latest reply: Jan 10, 2013 4:32 AM by Viet Tran RSS

Does JBoss 7 supports .har (hibernate archive) deployment?

yashendra chandrakar Newbie

I have a .har file which contains hibernate.xml

 

<hibernate-configuration xmlns="urn:jboss:hibernate-deployer:1.0">

   <session-factory name="java:/hibernate/SessionFactory" bean="myapp.jboss:service=Hibernate">

      <property name="datasourceName">java:/DefaultDS</property>

      <property name="dialect">org.hibernate.dialect.MySQLDialect</property>

      <!--property name="sessionFactoryInterceptor">org.jboss.test.hibernate.SimpleInterceptor</property-->

      <property name="cacheProviderClass">org.hibernate.cache.EhCacheProvider</property>

      <property name="scanForMappingsEnabled">true</property>

      <property name="hbm2ddlAuto">update</property>

      <!--<property name="show_sql">true</property>-->

      <depends>jboss:service=Naming</depends>

      <depends>jboss:service=TransactionManager</depends>

       <!--TODO: JBoss7.1 Upgrade -->

       <!--<depends>jboss.jca:service=LocalTxCM,name=DefaultDS</depends>-->

   </session-factory>

</hibernate-configuration>

 

 

And then my EJBs and other components have following code

 

@Resource(mappedName = "java:/hibernate/SessionFactory")

private SessionFactory sessionFactory;

 

JBoss 7 is failing to deploy those components which have above code.

 

Do I need to convert those to JPA? Can I still deploy .har in JBoss 7?