On Mar 13, 2008, at 9:37, Massimo Marazza wrote:
Suppose memcached server is up. No problem found when I start the
context and I request the page, but if
I stop the memcache server then I start it and I request the page,
the MemcachedClient object is not able to cache
contents.
If I use a different approach in the tag lib, that is create a new
MemcachedClient object
public int doStartTag() throws JspException {
try {
String hostcache =
pageContext.getServletContext().getInitParameter("hostmemcached");
memcachedClient = new
MemcachedClient(AddrUtil.getAddresses(hostcache));
......
}
and if I do a memcached server stop and start, after the restart the
MemcachedClient is able to cache objects.
For me that's strange...
Maybe the right approach when the memcache server goes down is to
restart the web container (Tomcat)?
It sounds like you're describing a bug, but it's not something I've
seen before. I sometimes forget to start my memcached instances
before starting my tests and they still pass after I start the server.
What version are you running, and on what OS? Are there any errors
being written anywhere? Perhaps an assertion fired (are you running
with assertions enabled?).
--
Dustin Sallings