I’m using the ColdFusion 9 coldfusion.runtime.SessionTracker to monitor currently logged in users using the following code.
app = application.getApplicationSettings().name;
sessiontracker = createObject("java","coldfusion.runtime.SessionTracker");
sessionCollection = sessionTracker.getSessionCollection(app);
Which returns a struct of jsessionid‘s and the session’s variables for all the currently active sessions.
Is it possible to force a session to end given I have the jsessionid effectively forcing the user to be logged out?
Thanks,
Richard
So when a user logs in I’m setting a
userstructure in their session, so to remove their logged in state. UsingsessionTrackerI can get a specific user’s session and just delete theuserstructure in their current session.Not sure if this is the best way of doing it but it seems to work for me. Hope it helps people.