|
Re: How get number of sessions? [message #1774467 is a reply to message #1774452] |
Mon, 16 October 2017 00:22 |
Chris Fairhall Messages: 221 Registered: February 2011 |
Senior Member |
|
|
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: Mon, 16 October 2017 00:29] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03564 seconds