Re: [appengine-java] JSF: sudden ViewExpiredException on GAE

2010-12-15 Thread Nick Belaevski
I'm currently looking at 
MemcacheService.SetPolicy
 trying 
to find out what can be causing the problem. Can please anyone shed some 
light on:

   1. Are changes of HttpSession attributes propagated into memcache first? 
   If 'yes', what is the default SetPolicy then?
   2. How data store service is involved in HttpSession handling?

-- 
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.



Re: [appengine-java] JSF: sudden ViewExpiredException on GAE

2010-12-08 Thread Nick Belaevski
Stephen,


Yes, sessions-enabled/true is there.

-- 
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.



Re: [appengine-java] JSF: sudden ViewExpiredException on GAE

2010-12-07 Thread Stephen Johnson
Well, I'll take a wild stab at it since I don't know Java Server Faces, but
since you say it was working and now has stopped. Do you have
true in your appengine-web.xml? If not,
add it. As of 1.4 this is now being adhered to whereas prior to this
sessions were enabled regardless. So perhaps even with sessions not enabled
you are able to get a session object from the servlet context for that
initial request but the appengine isn't saving state to the datastore so the
next request gets told that the requested session identifer is not
valid/expired.

On Tue, Dec 7, 2010 at 12:50 PM, Nick Belaevski  wrote:

> Hello all,
>
> I've suddenly stuck with JavaServer Faces application stopped working at
> GAE. Investigation shows that view state is not being stored in session
> correctly.
> What I also found out is that when the first request is being done (i.e.
> with clean session), ajax requests are working; but when another view is
> requested, ajax is not working there anymore. I assumed this is because
> updated view state is not being stored, and tried to make a slight change:
>
> a)  as is:
>
> Map statesMap = session.get("state");
> if (statesMap == null) {
> statesMap = new HashMap();
> session.put("state", statesMap);
> }
>
> statesMap.put("...", state);
> //force update in cluster
> session.put("state", statesMap);
>
> b) with the slight change:
> Map statesMap = session.get("state");
> if (statesMap == null) {
> statesMap = new HashMap();
> session.put("state", statesMap);
> }
>
> statesMap.put("...", state);
> //force update in cluster
> session.remove("state");
> session.put("state", statesMap);
>
> However the solution is not very good, so can please someone help with the
> problem?
>
> P.S. Runnable demo example is available here:
> http://java.net/jira/browse/JAVASERVERFACES-1886
>
> --
> 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.
>

-- 
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.



[appengine-java] JSF: sudden ViewExpiredException on GAE

2010-12-07 Thread Nick Belaevski
Hello all,


I've suddenly stuck with JavaServer Faces application stopped working
at GAE. Investigation shows that view state is not being stored in
session correctly.
What I also found out is that when the first request is being done
(i.e. with clean session), ajax requests are working; but when another
view is requested, ajax is not working there anymore. I assumed this is
because updated view state is not being stored, and tried to make a
slight change:


a) as is:


Map statesMap = session.get("state");
if (statesMap == null) {
statesMap = new HashMap();
session.put("state", statesMap);
}


statesMap.put("...", state);
//force update in cluster
session.put("state", statesMap);


b) with the slight change:

Map statesMap = session.get("state");
if (statesMap == null) {
statesMap = new HashMap();
session.put("state", statesMap);
}


statesMap.put("...", state);
//force update in cluster
session.remove("state");

session.put("state", statesMap);


However the solution is not very good, so can please someone help with
the problem?


P.S. Runnable demo example is available here:
http://java.net/jira/browse/JAVASERVERFACES-1886

-- 
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.