Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Closing all sessions(Closing all sessions)
Closing all sessions [message #1106995] Wed, 11 September 2013 21:08 Go to next message
Boy D'Poy is currently offline Boy D'Poy
Messages: 56
Registered: October 2011
Member
Hi!

How is it possible for an authorized user, from the client, to list all (active) sessions and so far, close them all.

Thank you!


Once You Go Scout, You Never Come Out!
Re: Closing all sessions [message #1107276 is a reply to message #1106995] Thu, 12 September 2013 07:19 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan Motsch
Messages: 100
Registered: March 2010
Senior Member
If that would be possible that a remote Client closes all server sessions, it would be a security issue.

However, there are two Locations to solve your issue:

1) in order to solve the popular issue of cancelling a previous request done by the same user, there is the ActiveTransactionRegistry that keeps track of the active Transactions. Each request has a ServiceTunnelRequest.getRequestSequence() that can be used by following requests to cancel a previous one
ActiveTransactionRegistry.cancel(transactionSequence)
using from the client side
SERVICES.getService(IServerProcessingCancelService.class).cancel(requestSequence)


2) since the scout server is a common j2ee Server, it uses http servlets and http sessions. Therefore you can use all measures that you can use in j2ee to invalidate and close sessions. The scout server session is just a property on the http session. So closing all http sessions in your Server (tomcat f.e.) will do the job.
Re: Closing all sessions [message #1107279 is a reply to message #1107276] Thu, 12 September 2013 07:22 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan Motsch
Messages: 100
Registered: March 2010
Senior Member
More details to 2)

the Scout Server session is accessible once you can Access a javax.servlet.http.HttpSession.
httpSession.getAttribute(IServerSession.class.getName())


Does this information help you going further in your work?
Re: Closing all sessions [message #1107415 is a reply to message #1107279] Thu, 12 September 2013 11:15 Go to previous message
Boy D'Poy is currently offline Boy D'Poy
Messages: 56
Registered: October 2011
Member
Thank you for your quick reply!

Sorry, I did not quite express ​​my question,
Being in an "business-logic-authorized" IClientSession (for example a SuperUserSession),
I am looking for a way to list the over opened IClientSession on a RAP server,
and so far, from that SuperUserSession invoke each over IClientSession#stopSession() method in a loop, to force them close (the backend sessions being automaticaly released).

Thank you!


Once You Go Scout, You Never Come Out!
Previous Topic:Validation, warnings and errors
Next Topic:Scout Standalone Client
Goto Forum:
  


Current Time: Fri Sep 19 12:03:17 GMT 2014

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

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