Hello,

 

I´m trying to add Ehcache (or any distributed cache solution in case you can
recommend one) to Castor in a Tomcat environment (J2EE). I´m looking
everywhere and I don´t manage to find the right docs and I´m not sure if I
have configured correctly and how to find out. Can you please point me to
the right docs or give me some clues to configure?

 

I have added the ehcache-1.2.4.jar to the lib directory and the ehcache.xml
and ehcache.xsd to the WEB-INF and I have added <cache-type type="ehcache"/>
to every xml map file.

These are the ehcache.xml properties I have:

 

<diskStore path="java.io.tmpdir"/>

 

<cacheManagerEventListenerFactory class="" properties=""/>

 

<cacheManagerPeerProviderFactory

 
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"

            properties="peerDiscovery=automatic,

                        multicastGroupAddress=230.0.0.1,

                        multicastGroupPort=4446, timeToLive=1"/>

 

    <cacheManagerPeerListenerFactory

 
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>

 

 

    <defaultCache

            maxElementsInMemory="10000"

            eternal="false"

            timeToIdleSeconds="120"

            timeToLiveSeconds="120"

            overflowToDisk="false"

            maxElementsOnDisk="10000000"

            diskPersistent="false"

            diskExpiryThreadIntervalSeconds="120"

            memoryStoreEvictionPolicy="LRU"

            />

 

 

I´m running the ehcache debugger and I don´t see any information.

java -jar ehcache-1.2.4-remote-debugger.jar ehcache.xml

 

This is the info get, and as you can see there are no caches…

 

13-abr-2007 11:28:57 net.sf.ehcache.distribution.RemoteDebugger main

INFO: Increase the net.sf.ehcache.distribution logging level to debug or
trace to see distributed cache operations as they occur.

13-abr-2007 11:29:00 net.sf.ehcache.distribution.RemoteDebugger main

INFO: Available caches are:

 

 

 

And if I try to update an object I get this exception:

 

org.exolab.castor.jdo.PersistenceException: No timestamp information for
object com.mbook.base.UserBase with identity <2(2)> available in cache
(anymore).

            at
org.exolab.castor.persist.ClassMolder.update(ClassMolder.java:888)

            at
org.exolab.castor.persist.LockEngine.update(LockEngine.java:685)

            at
org.castor.persist.AbstractTransactionContext.markUpdate(AbstractTransaction
Context.java:913)

            at
org.castor.persist.AbstractTransactionContext.update(AbstractTransactionCont
ext.java:966)

            at
org.exolab.castor.jdo.engine.AbstractDatabaseImpl.update(AbstractDatabaseImp
l.java:337)

 

 

 

 

Do I have to add a cache with a specific name any where? Any specific
properties? Do I need to add anything in the castor.properties?

Can you please give me a hand?

 

Thanks a lot and best regards,

Gonzalo Abollado.

Reply via email to