You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Lemke, Wesley" <We...@LibertyMutual.com> on 2005/04/27 21:34:59 UTC

Which Object Cache am I using?

I seem to be having problems with our object cache.  Items are getting
updated in the database even when nothing has changed.  I am using
oscache, as described in the OptimisitcLocking tutorial, and this is
what I have in OJB.properties:

#ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
ObjectCacheClase=com.lmig.pm.affinity.persistence.cache.ObjectCacheOSCac
heImpl
#ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
#ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
#ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl
#ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerClassImpl

However, when I started to debug my problem I noticed that none of the
methods in ObjectCacheOSCacheImpl were being called.  So I put some
print statements in (broker.serviceObjectCache().getClass().getName()),
and it looks like the Object Cache being used is either:
org.apache.ojb.broker.cache.MaterializationCache or
org.apache.ojb.broker.cache.CacheDistributor.  I have read that
MaterializationCache is a type of interal wrapper cache.  Why isn't OJB
using my ObjectCacheOSCacheImpl?

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Which Object Cache am I using?

Posted by Armin Waibel <ar...@apache.org>.
Hi Wes,

which version of OJB do you use? In OJB >1.0.2 the setting of 
ObjectCache is moved to repository file (see release note and caching docs).

regards,
Armin

Lemke, Wesley wrote:
> I seem to be having problems with our object cache.  Items are getting
> updated in the database even when nothing has changed.  I am using
> oscache, as described in the OptimisitcLocking tutorial, and this is
> what I have in OJB.properties:
> 
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
> ObjectCacheClase=com.lmig.pm.affinity.persistence.cache.ObjectCacheOSCac
> heImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerClassImpl
> 
> However, when I started to debug my problem I noticed that none of the
> methods in ObjectCacheOSCacheImpl were being called.  So I put some
> print statements in (broker.serviceObjectCache().getClass().getName()),
> and it looks like the Object Cache being used is either:
> org.apache.ojb.broker.cache.MaterializationCache or
> org.apache.ojb.broker.cache.CacheDistributor.  I have read that
> MaterializationCache is a type of interal wrapper cache.  Why isn't OJB
> using my ObjectCacheOSCacheImpl?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org