2014-07-08 18:28 GMT+04:00 Christopher Schultz <ch...@christopherschultz.net>: > > (...) > > For instance, one could write an EL expression that would be executed on > each session and return a true/false (or maybe just true/not-true), and > then expireSessions (plural, to distinguish it from the existing > single-session expiration operation). Something like this: > > ${!empty session.user && ((now - session.lastAccessedTime) > 120000)} > > Asking JMXProxyServlet to expire all sessions matching the above > expression would then kill any session that had no user attribute (might > have to use session.getAttribute('user')... I'm no EL expert) and was > also left unattended for 2-minutes or more. > > Is there any interest in this kind of thing? Parsing (specifically) and > executing EL expressions on the fly might be a bit expensive for > administrative operations, but of course one does not need to use such > features if one does not want to. > > I haven't really thought about it too much, but I suspect there would be > other situations where being able to filter objects using an EL-based > predicate might be useful. >
1. This example is not self-contained. It does not define "now". It does not define where "session" comes from. 2. Do you expect evaluation of EL to turn into series of JMX calls? I think those session properties are not available directly. You need to ask for them. 3. Error processing = ? Thread safety = ? I think this needs three or more use case examples to better understand the problem. If it is just a single use case, a custom JSP page may do better. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org