ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | enhydra List | Febuary 2005 Index

<--  Date Index  --> <--  Thread Index  -->

deleteSession() doesn't work?


Hi,

trying to prevent users from logging in several times. Based on the
comment in API DOC for setUser() I am trying to delete other sessions
with same User before calling setUser() for the current session.

Code looks as follows:
====================================
// session manager: make sure there is no other session with same name logged 
in
java.util.Enumeration e = 
comms.session.getSessionManager().getSessionKeys(this);
if (e.hasMoreElements()) {
        String seskey = (String) e.nextElement();
        comms.session.getSessionManager().deleteSession(seskey);
}

// session: set current user
comms.session.setUser(this);
====================================

Unfortunately the deleteSession() doesn't work. The session key is
correct but it doesn't delete the session. Any idea why?

Petr





<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.