Closing Session Code

hi all…

I would like to close the jid active session externally…how can i accomplish it? i have gone through the source…not clear about it. Please do share if anyone has done it before or suggestion.

thanks in advance…


I think you want the User Service plugin from the plugins page:

hi ianserlin…

well this userservice provides only the creation, updation and deleteion of the user…i need to kill the active user…scenario is…sometime if client got disconnected due to client n/w issue…server session is not getting disconnected, in that situation if the client tries to reconnect with same resource name…it throws conflict error (based on resource policy setup)… in that scenario i want external application to close the active session of that user. hope you got my problem…



hi all…

i have done it…made a custom servlet to achieve this…

here is the code…if possible i will make a openfire server plugin to allow the session to be killed through HTTP.



String jid = request.getParameter(“jid”);

SessionManager sessionManager = XMPPServer.getInstance().getSessionManager();

JID address = new JID(jid);

Session sess = sessionManager.getSession(address);




catch (Exception e) {