This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
How can I enumerate Active Sessions in my application so as in Tomcat 7 manager app ?
I've just tried to trace session creation/destruction using a custom SessionListener ... but I'm sure that can be used the Tomcat internal structure to retrieve the sessions reference.
For a general-purpose webapp, the best bet is to hook a session listener into a central monitoring point. Which could be as simple as an application-scope bean containing a hashtable.
For a webapp specifically intended to control Tomcat and only Tomcat, you should look at the Tomcat JMX/MEJB properties to see what's offered.
Only as a last resort should you hook into internal Tomcat code. Anything that dependent on the kitty's innards is probably going to require extensive rework every time Tomcat goes into a new major release.
Customer surveys are for companies who didn't pay proper attention to begin with.