private boolean isLocalMode = true;
@Override
public String getConfigurationType() {
isLocalMode =
super.getServletContext().getServerInfo().startsWith(
"Google App Engine Development");
return isLocalMode ? Application.DEVELOPMENT : Application.DEPLOYMENT;
}
@Override
protected ISessionStore newSessionStore() {
return new HttpSessionStore(this);
}
@Override
protected void init() {
super.init();
if (isLocalMode) {
getResourceSettings().setResourceWatcher(new AppEngineModificationWatcher());
}
}
@Override
protected WebRequest newWebRequest(HttpServletRequest servletRequest) {
if (isLocalMode) {
getResourceSettings().getResourceWatcher(true).start(
getResourceSettings().getResourcePollFrequency());
}
return super.newWebRequest(servletRequest);
}