Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How get number of sessions?
How get number of sessions? [message #1774452] Sat, 14 October 2017 19:04 Go to next message
Eclipse UserFriend
short question
How get number of active sessions?
Dmitry
Re: How get number of sessions? [message #1774467 is a reply to message #1774452] Sun, 15 October 2017 20:22 Go to previous messageGo to next message
Eclipse UserFriend
You'd probably have to write an HttpSessionListener to track HttpSession's. To count the number of RAP sessions, you'd need to iterate all the values of all the HttpSessions, and count the ones that are of type UISession

Doesn't sound like a very efficient way of doing things though. What's the use case? Simply for runtime stats?

You could put code in your entrypoint to track the sessions. If you run in SWT Compat mode, the start and end of your createUI method is one place to put it.
For JEE mode, I guess you could increment your count in createUI and add a listener to the UISession to decrement it when it's destroyed.


edit: Or use a HttpSessionBindingListener or HttpAttributeListener, that way you can tract UISession instances directly

[Updated on: Sun, 15 October 2017 20:29] by Moderator

Re: How get number of sessions? [message #1774979 is a reply to message #1774452] Mon, 23 October 2017 03:14 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
every UI session has a display object associated. You can use RAP internals to get a array with all display objects like in private method Display#getDisplays:
---
ContextProvider.getApplicationContext().getDisplaysHolder().getDisplays();
---
HTH,
Ivan
Re: How get number of sessions? [message #1832693 is a reply to message #1774979] Wed, 23 September 2020 07:50 Go to previous message
Eclipse UserFriend
Thanks Ivan, will try that and report back.
Previous Topic:Unable to load resource platform:/plugin/HelloWorld/Application.e4xmi
Next Topic:About the use of Table Shortcuts in Mac.
Goto Forum:
  


Current Time: Fri May 16 14:46:53 EDT 2025

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

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

Back to the top