just save an instance in the ServletContext attributes ... you should
avoid storing it in a Servlet instance field, in fact you should avoid
instance fields in Servlets entirely since they are typically supposed
to be reentrant ...

On Sep 14, 8:03 am, Don Schwarz <[email protected]> wrote:
> No, that sounds like a fine approach.  You could even create multiple Cache
> instances and they would still be backed by the same underlying store
> (assuming they have the same namespace).
>
>
>
> On Mon, Sep 14, 2009 at 9:18 AM, Jeff <[email protected]> wrote:
>
> > For above Memcache question, I simply implemented a javax.cache.Cache
> > singleton pattern. I now have access to the cache from more than one
> > servlet. Is anyone aware that this implementation might problematic in
> > the Google App Engine distributed(cloud) runtime?
>
> > Thanks,
>
> > Jeff
>
> > On Sep 11, 2:45 pm, Jeff <[email protected]> wrote:
> > > Hello,
>
> > > I plan on using Google App Engine'sMemcacheservice. I've read the
> > > online documentation and looked at a demo example. With both,
> > theMemcache"Cache instance" is an instance variable within a servlet. If
> > > I use more than one servlet, but want to access the same cache, how is
> > > that done? Am I to use GCacheFactory.NAMESPACE property when I
> > > createCache(property)? Will this namespace allow me to access the same
> > > cache across servlets?
>
> > > Thanks,
>
> > > Jeff- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to