Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to handle custom "SessionExpired"-exceptions in RAP (RCP is fine)
How to handle custom "SessionExpired"-exceptions in RAP (RCP is fine) [message #910831] Mon, 10 September 2012 13:15 Go to next message
Alexandru Pintilie is currently offline Alexandru PintilieFriend
Messages: 3
Registered: September 2012
Junior Member
Hello,

I'm writing a singlesourcing application and have difficulties figuring out the exception handling mechanism in RAP.

In RCP I have registered a status handler which handles my custom SessionExpiredException by notifying the user that his session expired and then shutting down the platform (client). This is intended behavior.

In RAP I must handle this differently because of the multi-user environment. Can I register a status handler in RAP too? How would the status handler know in which browser to open the "session expired" dialog and then to redirect the browser to the login page?

Or what is a better way to implement this, with or without status handler?

Thanks,
Alex
Re: How to handle custom "SessionExpired"-exceptions in RAP (RCP is fine) [message #911043 is a reply to message #910831] Mon, 10 September 2012 21:47 Go to previous messageGo to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
If the status handler is called in the UI thread (I assume it is, since it handles uncaught exceptions in the UI thread) then you already know which browser is effected. Any UI code you execute will be in the context/session of the user who caused the exception.
Re: How to handle custom "SessionExpired"-exceptions in RAP (RCP is fine) [message #911216 is a reply to message #911043] Tue, 11 September 2012 07:37 Go to previous messageGo to next message
Alexandru Pintilie is currently offline Alexandru PintilieFriend
Messages: 3
Registered: September 2012
Junior Member
Thanks! I'll try it out and post the result.
Re: How to handle custom "SessionExpired"-exceptions in RAP (RCP is fine) [message #912420 is a reply to message #911043] Thu, 13 September 2012 14:47 Go to previous message
Alexandru Pintilie is currently offline Alexandru PintilieFriend
Messages: 3
Registered: September 2012
Junior Member
Hello Chris, your solution worked just fine!

I tested this with two different users which are both logged in, one from Chrome, one from Firefox. I "killed" the session of the first user and he was notified and logged out. The second user was not affected.

So yes, the status handler catches the exception in the right context(UI Thread) and knows somehow which browser to notifiy.

Thank you, Alex.
Previous Topic:MESSAGE Exception in org.eclipse.ui.internal.PageLayout.addView
Next Topic:Session failover for workbench planned?
Goto Forum:
  


Current Time: Thu Apr 25 10:18:07 GMT 2024

Powered by FUDForum. Page generated in 0.03282 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top