Hi all,

I use gwt-dispatch in a project and now I have a question concerning
the gwt-dispatch framework and member variables in ActionHandlers.
I use guice on server side and bind the ActionHandlers as follow:
bindHandler(GetXYHandler.class);  <- this is per definition no
singleton!

In GetXYHandler I have a member variable, which stores the data
retrieved from Googles MemCacheService:
private Map<String, Serializable> cacheMap = new HashMap<String,
Serializable>();

When making a server request in the execute method of GetXYHandler the
cacheMap is filled with objects, when a cache hit in memcache occurs  -
> the cacheMap member variable is not empty anymore!

My understanding of member variables (in example "cacheMap") is, that
they should be created new in each serverCall if they are not static.
In my case the cacheMap should be empty each time when the execute
method is called.
In my local tests the behaviour is somewhat different. When I test it
in debug modus locally (different user calls), the cacheMap stays
always filled like a static variable. Is this the normal behaviour of
member variables of Actionhandlers? My understanding would say this is
very curious, because its not a singleton?
If this is normal behaviour, no member variables could be used,
because they would not be synchronized...

Thanks for your help!

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to