Hi Niall,

If you are using an auxiliary RemoteCacheFactory make sure you set
RemoveUponRemotePut=true otherwise the data in a different cache will
only get the latest changes after it expires from its local cache and is
forced to check the remote cache. When RemoveUponRemotePut=true, as soon
as it changes, all the local caches will have their objects removed for
the given key.

e.g. for my RemoteCacheFactory called RFailover:

jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true

Regards,
Simon

-----Original Message-----
From: Niall Gallagher [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 26, 2007 7:39 PM
To: JCS Users List
Subject: JCSAdmin.jsp doesn't broadcast removes?

Hi,

Not sure if this has been asked before..

We have found that the JCSAdmin.jsp running on our central cache server,
does not seem to broadcast removes to client machines when we clear
regions via this JSP on the central server. Is this expected behaviour
or a bug?

We have gotten around the problem by writing our own custom JSPs based
on the JCSAdmin.jsp and JCSAdmin bean, and deploying them in the same
webapp as the JCSAdmin.jsp and jcs jar file (let's call this the "jcs
webapp"). Our custom JSPs don't actually clear regions themselves, they
POST the requests to another webapp we have written.

The other webapp we have written (let's call it "jcs assistant")
contains just a simple servlet which listens for HTTP POSTs asking it to
clear certain regions or elements. This servlet clears the requested
region using the normal JCS API as if it was a normal client machine
(note that we only use string keys, so we can send them in the POST).

Both webapps are deployed to JBoss 4.2.1GA. We found that we had to
configure Isolated -> true in the ear-deployer.xml file, to force JBoss
to load a separate copy of JCS for both webapps.

Basically- we've found that when a client puts an object in the cache it
gets sent to the central server and shows up on both our JSPs and the
JCSAdmin.jsp.
If we remove the object from the cache via JCSAdmin.jsp, it disappears
from both sets of JSPs, but if the client then tries to retrieve the
same object from the cache again it unexpectedly *succeeds* (this is
without the client shutting down between runs).
If we remove the object from the cache via our "JCS assistant" webapp,
it disappears from both sets of JSPs, and if the client then tries to
retrieve the same object from the cache again it gets null as expected.

Has anyone seen this behaviour before? Is there anything we can do to
fix it? Obviously having to hack JSPs and deploy two webapps isn't a
very good solution to this problem.

Thanks in advance,

Niall


This message and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this message in error please delete it and any files 
transmitted with it, after notifying [EMAIL PROTECTED] 
Any opinions expressed in this message may be those of the author and not 
necessarily those of the company. The company accepts no responsibility for the 
accuracy or completeness of any information contained herein. This message is 
not intended to create legal relations between the company and the recipient. 
Recipients should please note that messages sent via the Internet may be 
intercepted and that caution should therefore be exercised before dispatching 
to the company any confidential or sensitive information. 
Mizuho International plc Bracken House, One Friday Street, London EC4M 9JA. 
TEL. 020 72361090. Wholly owned subsidiary of Mizuho Securities Co., Ltd. 
Member of Mizuho Financial Group. Authorised and regulated by the Financial 
Services Authority. Member of the London Stock Exchange. 

Registered in England No. 1203696. Registered office as above.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to