powered by Jive Software

Problems to implement a session listener on a plugin

Hi all,

I’m trying to implement a HttpSessionListener to obtain all sessions keys that are active on server i ussualy set:

public class HttpSessionCollector implements HttpSessionListener {
    private static final Map<String, HttpSession> sessions = new HashMap<String, HttpSession>();     @Override
    public void sessionCreated(HttpSessionEvent event) {
        HttpSession session = event.getSession();
        sessions.put(session.getId(), session);
    }     @Override
    public void sessionDestroyed(HttpSessionEvent event) {
    }     public static HttpSession find(String sessionId) {
        return sessions.get(sessionId);
    }     public static Map<String, HttpSession> getSessions() {
        return sessions;

and set on web-custom.xml


But this not work…

however i find this http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/javadoc/ org/jivesoftware/openfire/http/HttpSession.html

but im having no luck to use it :confused: