axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "LIE Jorund" <>
Subject RE: SOAP-Session management; terminate session.
Date Wed, 02 Apr 2008 15:07:19 GMT
I found a workaround for (2.) by setting the lastTouchedTime for the service group context
to 0, the next cleanup will then destroy the session context. In the service class there is
a method like this:
public void endSession()
    ServiceGroupContext serviceGroupContext = MessageContext.getCurrentMessageContext().getServiceGroupContext();
This seems to do the trick, although I do not feel that the solution is very clean.


From: LIE Jorund 
Sent: Tuesday, April 01, 2008 11:12 AM
Subject: SOAP-Session management; terminate session.

I would need to use the SOAP session management facilities in Axis2-1.3, and I have a question
about terminating a session.
Following the description for session management I have prepared a small prototype web service
that initiates the session, returns the service group ID for the session to the client, and
receives subsequent requests using the session ID. If there are no requests for a session-ID
during a context timeout interval (set to 30 sec) the session becomes inactive. So far so
good, this works fine, but I have 2 questions tough.
1. From tracing the destroy() method of my web service class I see that the object instance
is not destroyed immediately after the context timeout. It seems like the session becomes
stale, and that the object instance corresponding to stale sessions are destroyed after any
new request to the web service. Is this correct?
2. I would like to find a way to terminate the sessions triggered by a certain operation (e.g.
by a logout), not by the inactivity timeout. How can this be achieved in a clean way?
Thanks and Regards.
Jørund Lie

View raw message