GAEApplicationServlet too eager with session cleanup

It seems that the servlet closes all applications after every request. removes the context from the session, which will in turn result in Application.close() being called. Testcase:

public class TestcaseApplication extends Application {
	public void init() {
		setMainWindow(new Window("Testcase Application"));

	public void close() {
		System.out.println("Close called");

Just loading the app in a browser results in close() being called twice. This happens with GAE dev server, but not with ApplicationServlet on Tomcat.

I experienced the same with the local dev server, but not elsewhere. My conclusion was that there is something wrong with the serialization / session timeout handling on dev server (not necessarily with Vaadin). Have you tested with plain JSPs?

I did not test it but the stack trace that results in Application.close() starts at GAEApplicationServlet so I don’t think that JSPs are affected.

a ticket