Replacement for PhaseListeners in RAP 2.x [message #1064684] |
Thu, 20 June 2013 14:12 |
Thorsten Lichtenwalter Messages: 12 Registered: February 2013 |
Junior Member |
|
|
Up to now (RAP 1.x) I used a PhaseListener to be notified of any client action. This was a nice way to implement a session timeout mechanism in my RAP server app. Every time a user loggs in a PhaseListener is started and every client action will trigger an update in my timeout handler. RAP 2.x doesn't provide this feature any more. It's limited to register PhaseListeners at application startup only. Is there any possibility to be notified of any client action within RAP context? Or do I have to broaden the scope and use ServletFilters?
Thorsten Lichtenwalter
Software Development
msgGillardon AG, Bretten, Germany
|
|
|
|
Re: Replacement for PhaseListeners in RAP 2.x [message #1065274 is a reply to message #1065069] |
Tue, 25 June 2013 08:23 |
Thorsten Lichtenwalter Messages: 12 Registered: February 2013 |
Junior Member |
|
|
Hi Ralf,
> Could you explain why you need to implement the session timeout yourself
> and how your timeout differs from the servlet container's session timeout?
I am using a short http timeout and a long application timeout. Advantage: in case of a browser crash it won't allocate resources on the server for too long (because of a short http timeout). But to refresh the application timeout i'll have to be aware of every client action. Using a PhaseListener was a fine solution.
> Why does a static PhaseListener not work in your case?
What do you mean by 'static'? I can still continue using the old way of using a PhaseListener (every time a user loggs in a PhaseListener is started) but the api is deprecated. I want to implement a solid solution.
Are there any alternatives?
Thorsten Lichtenwalter
Software Development
msgGillardon AG, Bretten, Germany
[Updated on: Tue, 25 June 2013 08:24] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05369 seconds