4 Replies Latest reply on May 19, 2005 7:50 AM by srinivas vasu

    MBean for Hibernate3 with Jboss ... solved !

    samfra Newbie


      I wanted to upgrade to Hibernate3... but JBoss is for Hibernate2... otherwise the mbean don't start because it's looking for net.sf.* classes... and Hibernate3 is now org.hibernate.*

      So what did I do ?
      Well I've installed the latest Jboss 4.0.1sp1
      I've downloaded Hibernate3 (hibernate3.jar + antlr-2.7.5H3.jar)

      put them in the har deployer directory (delete hibernate2.jar)

      and now 2 things :

      jboss-hibernate.jar is for hibernate2
      so with the sources of JBoss, compile the hibernate module and replace all net.sf.hib* with org.hib*
      then replace your jboss-hibernate.jar

      be careful, if you use ehcache, modify the provider your hibernate-service.xml must look like that :

       <mbean code="org.jboss.hibernate.jmx.Hibernate"
       <attribute name="DatasourceName">java:/CENTRIX_DS</attribute>
       <attribute name="Dialect">org.hibernate.dialect.SQLServerDialect</attribute>
       <attribute name="CacheProviderClass">org.hibernate.cache.EhCacheProvider</attribute>
       <attribute name="SessionFactoryName">java:/HIBERNATE</attribute>
       <attribute name="ShowSqlEnabled">false</attribute>

      well maybe it would be more simple to download the correct jboss-hibernate.jar for hibernate3 ....

      how can I attach it here ? in the wiki ? I go and see there.....[/img]