Holy Sh***. I'm very mad at Hibernate documentation at this point. although I've found some wiki info:
http://wiki.jboss.org/wiki/Wiki.jsp?pag ... Hibernate2
There's no info on integration with JBossCache. Ok So I tried the Hibernate 3 page and found some help :D I've end up with this:
<server>
<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=DrogatelHibernate">
<depends>jboss:service=Naming</depends>
<depends>jboss:service=TransactionManager</depends>
<depends>jboss.cache:service=TreeCache</depends>
<attribute name="CacheProviderClass">org.jboss.hibernate.cache.DeployedTreeCacheProvider</attribute>
<attribute name="DeployedTreeCacheJndiName">jboss.cache:service=TreeCache</attribute>
<attribute name="DatasourceName">java:/DrogatelDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.SQLServerDialect</attribute>
<attribute name="SessionFactoryName">java:/hibernate/DrogatelSessionFactory</attribute>
<attribute name="ShowSqlEnabled">true</attribute>
</mbean>
</server>
<server>
<classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
<mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
<depends>jboss:service=Naming</depends>
<depends>jboss:service=TransactionManager</depends>
<attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
<attribute name="IsolationLevel">REPEATABLE_READ</attribute>
<attribute name="CacheMode">LOCAL</attribute>
<attribute name="ClusterName">TreeCache-Cluster</attribute>
</mbean>
</server>
Well, everthing looked fine, but ... hibernate.deployer is meant for 3.x version... digging wiki I've found the 2.x version.
Ok, now my problem is that the deployer can not find the jndi name provided. I shall remember those willing to help ;) that that configuration was an Hibernate wiki suggestion.
Could someone please help me? I promise Ill create a cool wiki about the topic afterwards...
Thanks