OSCache cluster problem

<[email protected]>
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <2D5AECC918E55C40948F8723782A648E02B839D6@IND-SPZ7ECL001.mastek.com>
Hi,

 

Could someone please tell me where I'm going wrong in getting OSCache to
work in a cluster?

 

For starters, I put a simple Web-app consisting of 2 servlets along with
OSCache library on 2 separate identical tomcat installations. (To keep
it very simple, Tomcat is not clustered.)

 

The first servlet creates an instance of ServeletCacheAdministrator and
tries to get a value from cache. If NeedsRefreshException is called,
then value is put in cache from database. 

 

The second servlet simply puts a new value in database and does a
flushAll() on the SCA instance

 

I have the following enabled in my oscache.properties file. 

 

cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.Ja
vaGroupsBroadcastingListener,com.opensymphony.oscache.extra.CacheEntryEv
entListenerImpl,com.opensymphony.oscache.extra.CacheMapAccessEventListen
erImpl,com.opensymphony.oscache.extra.ScopeEventListenerImpl

 

cache.cluster.multicast.ip=231.12.21.132

 

I found that when I hit the first servlet on each tomcat server, the log
shows that both members have joined the cluster and both show same value
from cache. This is perfectly fine.

 

Now when I hit the second servlet (new value + flushAll) on one server,
the new value is updated in cache on only that server. For some reason
the flushAll event is not getting propagated to the other member in the
cluster, and as a result the other 

server still shows old value in cache. It updates only after the timeout
period. 

 

Please help me out with this, since I'm hoping to recommend OSCache to
Java projects across my company wherever distributed caching requirement
exists.

 

Regards,

 

Winston.  

 

 

 

 

 

 

 



MASTEK
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCO

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from all computers.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.