Larger application (spring/hibernate/ehcache) running on Terracotta

With some tweaking I managed to get one of the webapps in our current project to run using terracotta to cluster caches. The only modification I had to make was related to one of my objects not being threadsafe; actually I solved a potential concurrency problem.

Configuring Terracotta proved to be a bit more complex then I anticipated; but this might be due to my lack of Terracotta knowledge.

Here is the tc-config file I created:

[xml]

xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-3.xsd">




/Users/peter/JavaApplications/sandbox/log/%D











false


nl.cinema..*


org.hibernate.collection..*


org.hibernate.cache..*


org.hibernate.type..*


org.hibernate.EntityMode

net.sf.ehcache.store.DiskStore.spoolThread
net.sf.ehcache.Cache.shutdownHook
net.sf.ehcache.store.LfuMemoryStore.random


* nl.cinema.domain.global.Describer.*(..)
write


* nl.cinema.domain.util.CacheGroup.*(..)
write



/WEB-INF/applicationContext.xml

logger
configLocation


logger
configLocation








[/xml]

I’m not sure if it would be possible to specify the non-distributed-field in a more global way; without resolving to XML entities.

This entry was posted in java. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>