RE: [Opensymphony-oscache] help with clustering

"Thomas Sasala" <[email protected]> Mon, 09 May 2005 14:06:27 +0000
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <[email protected]>
Unless something has changed in the last couple of weeks, to the best of my 
knowledge, oscache does not handle distributed object tracking.  That is, 
oscache does not serialize cached objects and distribute them across all 
caches.  The only messages sent to distributed caches are flush messages.  
Try sending a flush message and see what happens.  My results have been 
mixed (e.g., unreliable reception of flush messages) using jgroups and 
multicast.  However, I have not had time to investigate the problem well 
enough to report the issue (if there is one).

-Tom

>From: "Neos 76" <[email protected]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: [Opensymphony-oscache] help with clustering
>Date: Mon, 09 May 2005 02:32:02 +0200
>
>Hi,
>
>I'm new to OSCache. I configured OSCache (2.1.1) to use JGroups to 
>broadcast cahce events. This is my oscahce.properties file (in 
>WEB-INF/classes folder):
>
>cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener, 
>  \
>                     
>com.opensymphony.oscache.extra.CacheEntryEventListenerImpl,               \
>                     
>com.opensymphony.oscache.extra.CacheMapAccessEventListenerImpl,           \
>                     com.opensymphony.oscache.extra.ScopeEventListenerImpl
>
>cache.memory=true
>cache.capacity=10
>cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache
>cache.blocking=false
>
>Cluster looks like to be ok. In log file I see
>
>...
>16:58:31,956 INFO  [JavaGroupsBroadcastingListener] JavaGroups clustering 
>support started successfully
>
>I see also that two app are joined to the cluster
>
>I'm working with two servlet container (Caucho Resin) on two phisical 
>server.
>The problem is that using GenralCacheAdministrator (I save it in a static 
>field), the cache on the first server is not distributed on second server. 
>I dont'see notification messages.
>I do simply this:
>
>on first server I create an object and put the object in cache with key 
>"mykey1". On second server I get object stored in key "mykey1" but I have a 
>NeedsRefreshException.
>
>code 1:
>
>CacheManager cacheManager = CacheManager.getInstance(); // my class to save 
>GeneralCacheAdministrator
>GeneralCacheAdministrator cacheAdm = 
>cacheManager.getGeneralCacheAdministrator();
>Car car = new Car(carId,carColor);
>Cache cache = cacheAdm.getCache();
>cacheAdm.putInCache("Car1",car);
>
>code 2:
>
>CacheManager cacheManager = CacheManager.getInstance();
>GeneralCacheAdministrator cacheAdm = 
>cacheManager.getGeneralCacheAdministrator();
>Cache cache = cacheAdm.getCache();
>Car carInCache = (Car) cacheAdm.getFromCache("Car1"); // throws 
>NeedsRefreshException
>
>Can you tell me where is my mistake? I'm being crazy...
>Thank you in aadvance
>Neos
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today it's FREE! 
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/