Re: Strategy for dealing with stale sessions?
startContext(WebAppContext.java:1216) >at > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509) >at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447) >at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) >at > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) >at org.mortbay.jetty.Server.doStart(Server.java:222) >at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) >at runjettyrun.Bootstrap.main(Bootstrap.java:121) > 2013-05-16 13:32:59.609::WARN: Error starting handlers > java.lang.UnsupportedClassVersionError: > com/flowlogix/web/services/ServicesModule : Unsupported major.minor version > 51.0 >at java.lang.ClassLoader.defineClass1(Native Method) >at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) >at java.lang.ClassLoader.defineClass(ClassLoader.java:615) >at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) >at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) >at java.net.URLClassLoader.access$000(URLClassLoader.java:58) >at java.net.URLClassLoader$1.run(URLClassLoader.java:197) >at java.security.AccessController.doPrivileged(Native Method) >at java.net.URLClassLoader.findClass(URLClassLoader.java:190) >at > org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366) >at > org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337) >at java.lang.Class.forName0(Native Method) >at java.lang.Class.forName(Class.java:247) >at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:157) >at > org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137) >at > org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107) >at > org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77) >at > org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:124) >at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:103) >at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) >at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) >at > org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589) >at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) >at > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216) >at > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509) >at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447) >at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) >at > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) >at org.mortbay.jetty.Server.doStart(Server.java:222) >at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) >at runjettyrun.Bootstrap.main(Bootstrap.java:121) > >> CC: users@tapestry.apache.org >> From: lpri...@hope.nyc.ny.us >> Subject: Re: Strategy for dealing with stale sessions? >> Date: Mon, 13 May 2013 11:44:45 -0400 >> To: users@tapestry.apache.org >> >> FlowLogix library handles this generically by reloading the page if session >> expired. >> Take a look specifically at @AJAX annotation. >> >> http://code.google.com/p/flowlogix/wiki/TapestryLibrary >> http://code.google.com/p/flowlogix/wiki/TLAJAXAnnotation >> >> On May 13, 2013, at 6:24 AM, Ben Titmarsh wrote: >> >>> My application is heavily dependent on state using @Persist annotations. >>> If a user gets the application into a certain state, then their session >>> becomes stale (i.e. they leave their computer for half an hour), what is >>> the preferred approach for graceful recovery of the application now that >>> the Persistent fields are null? >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Strategy for dealing with stale sessions?
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at runjettyrun.Bootstrap.main(Bootstrap.java:121) 2013-05-16 13:32:59.609::WARN: Error starting handlers java.lang.UnsupportedClassVersionError: com/flowlogix/web/services/ServicesModule : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:157) at org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137) at org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107) at org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77) at org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:124) at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:103) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at runjettyrun.Bootstrap.main(Bootstrap.java:121) > CC: users@tapestry.apache.org > From: lpri...@hope.nyc.ny.us > Subject: Re: Strategy for dealing with stale sessions? > Date: Mon, 13 May 2013 11:44:45 -0400 > To: users@tapestry.apache.org > > FlowLogix library handles this generically by reloading the page if session > expired. > Take a look specifically at @AJAX annotation. > > http://code.google.com/p/flowlogix/wiki/TapestryLibrary > http://code.google.com/p/flowlogix/wiki/TLAJAXAnnotation > > On May 13, 2013, at 6:24 AM, Ben Titmarsh wrote: > > > My application is heavily dependent on state using @Persist annotations. > > If a user gets the application into a certain state, then their session > > becomes stale (i.e. they leave their computer for half an hour), what is > > the preferred approach for graceful recovery of the application now that > > the Persistent fields are null? > > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >
RE: Strategy for dealing with stale sessions?
Lenny, George, Thanks for the replies. I actually left a somewhat crucial piece of information out of my initial post in that I am talking specifically about Ajax! So Lenny this library looks fantastic, exactly what I was looking for! > CC: users@tapestry.apache.org > From: lpri...@hope.nyc.ny.us > Subject: Re: Strategy for dealing with stale sessions? > Date: Mon, 13 May 2013 11:44:45 -0400 > To: users@tapestry.apache.org > > FlowLogix library handles this generically by reloading the page if session > expired. > Take a look specifically at @AJAX annotation. > > http://code.google.com/p/flowlogix/wiki/TapestryLibrary > http://code.google.com/p/flowlogix/wiki/TLAJAXAnnotation > > On May 13, 2013, at 6:24 AM, Ben Titmarsh wrote: > > > My application is heavily dependent on state using @Persist annotations. > > If a user gets the application into a certain state, then their session > > becomes stale (i.e. they leave their computer for half an hour), what is > > the preferred approach for graceful recovery of the application now that > > the Persistent fields are null? > > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >
Re: Strategy for dealing with stale sessions?
FlowLogix library handles this generically by reloading the page if session expired. Take a look specifically at @AJAX annotation. http://code.google.com/p/flowlogix/wiki/TapestryLibrary http://code.google.com/p/flowlogix/wiki/TLAJAXAnnotation On May 13, 2013, at 6:24 AM, Ben Titmarsh wrote: > My application is heavily dependent on state using @Persist annotations. If > a user gets the application into a certain state, then their session becomes > stale (i.e. they leave their computer for half an hour), what is the > preferred approach for graceful recovery of the application now that the > Persistent fields are null? > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Strategy for dealing with stale sessions?
I think this is an application-specific question. When the application server's underlying session expires, all your @Persisted fields become null, as you say. If the user continues, it's just as if a random, unknown user arrived and attempted to start interacting with your application somewhere deep inside. Presumably you need to gracefully direct them to the start of your application, where you can (potentially authenticating them first) start setting persistent state once more. An alternative would be for you to use a different persistence strategy other than 'session'. The wiki has an example of a cookie-based strategy (link below). Another option would be some sort of database storage. You stick a key in the session or a cookie, and this is used to look up the rest of the state, which is stored in something more long term, like a database. If the session expires, then when they re-authenticate, you can associate the new session with the key they were using last time. On 13 May 2013 06:24, Ben Titmarsh wrote: > My application is heavily dependent on state using @Persist annotations. > If a user gets the application into a certain state, then their session > becomes stale (i.e. they leave their computer for half an hour), what is > the preferred approach for graceful recovery of the application now that > the Persistent fields are null? >