-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: TreeCache under Tomcat
PostPosted: Wed Apr 21, 2004 5:26 pm 
Newbie

Joined: Wed Apr 21, 2004 5:12 pm
Posts: 2
Location: London, UK
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.