Hi all,
I have the JBoss Treecache working with hibernate under Tomcat 4.1 using JOTM. My question is, does anyone know how I can configure the cache? I assume that it is running with the default settings ta the moment.
I would like to make the cache distributed, and hence need to set some of the parameters that can be found in step 9 here:
http://www.jboss.org/developers/projects/jboss/cache/TreeCache.html
Here is a snippet from server.xml:
Code:
<Context path="/gt" debug="0" docBase="gt" reloadable="true" crossContext="false">
<!-- Resource configuration for UserTransaction
use JOTM
-->
<Resource name="UserTransaction" auth="Container"
type="javax.transaction.UserTransaction"/>
<ResourceParams name="UserTransaction">
<parameter>
<name>factory</name>
<value>org.objectweb.jotm.UserTransactionFactory</value>
</parameter>
<parameter>
<name>jotm.timeout</name>
<value>60</value>
</parameter>
</ResourceParams>
</Context>
And hibernate.cfg.xml:
Code:
<hibernate-configuration>
<session-factory >
<!-- local connection properties -->
<property name="hibernate.connection.url">jdbc:mysql://192.168.0.2:3306/gedTemplates</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.username">____</property>
<property name="hibernate.connection.password">____</property>
<!-- dialect for MySQL -->
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.use_outer_join">true</property>
<property name="hibernate.transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property>
<property name="hibernate.transaction.manager_lookup_class">net.sf.hibernate.transaction.JOTMTransactionManagerLookup</property>
<mapping resource="Container.hbm" />
<mapping resource="User.hbm" />
<mapping resource="Templates.hbm" />
<mapping resource="Masterscreens.hbm" />
<mapping resource="Status.hbm" />
<mapping resource="Roles.hbm" />
</session-factory>
</hibernate-configuration>
Thanks in advance.
Hibernate 2.1.2
Tomcat 4.1
JOTM 1.5.3