Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 534262

Summary: Migration to RAP 3.X - Removal of Phases and Phase Listeners
Product: [RT] RAP Reporter: Rockhopper <bugs.eclipse.org>
Component: OtherAssignee: Project Inbox <rap-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Rockhopper CLA 2018-05-02 09:28:37 EDT
As suggested in "RAP 3.0 Migration Guide", I'm opening this ticket because we have a use case where PhaseListener seems required.

Indeed, we were using this API to implement a UI session timeout: after a given period of inactivity of the user in the browser, the RAP UI session is invalidated (along with our applicative session).

The PhaseListener was used to reset a timer leading to UI session invalidation each time a request was received for that UI session. 

For various reasons we cannot rely on HTTP session invalidation.

One of these reasons, is that inside the browser we may have several tabs running the same (RAP) application and we want to invalidate only the UI sessions corresponding to tabs where we have no action from the user. 

Any alternative in RAP 3.x to PhaseListener to trigger such timer reset on each request (for a given UI session)?
Comment 1 Ivan Furnadjiev CLA 2018-05-03 04:13:47 EDT
The replacement of PhaseListener is UIThreadListener. See also [1]

[1] http://download.eclipse.org/rt/rap/doc/3.4/guide/reference/api/org/eclipse/rap/rwt/service/ApplicationContext.html#addUIThreadListener(org.eclipse.rap.rwt.service.UIThreadListener)

Please reopen if UIThreadListener does not fit your needs.