On Tuesday 22 October 2002 09:26, [EMAIL PROTECTED] wrote:
> Hi Matthias,
>       I have put Axis on ATG, but the sessions does not get killed
> even though I've set it to "Request" scope. I had to invalidate
> the session from the AxisServlet to kill the session, which I
> definitely don't want(don't want to touch axis source code). Is
> there a way to have a session killed?
>

Hello,

I do not know a real solution either. SOAP is not really designed for 
being stateful, maybe you should consider using something else. As a 
workaround, you can set the session timeout to 1.
(BTW, I tested the code below only with Tomcat, but it should work on 
any standard-compliant servlet container)

Be also aware of this bug when you try to implement ServiceLifecycle: 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11815 

Best regards!
--------------------------------------

public class Service {

org.apache.axis.Session currentSession;

public Service() {
        MessageContext m = MessageContext.getCurrentContext();
        HttpServletRequest srq =
                (HttpServletRequest)m.
                getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
        HttpSession httpSession = srq.getSession(false);
        currentSession = new AxisHttpSession(httpSession);
}

public logout() {
        currentSession.setTimeout(1);
}

}
-- 
Matthias Brunner <[EMAIL PROTECTED]>
PGP FP 7862 32B3 3B75 292A F76F  5042 8587 21AB 5B89 D501
Check out http://blumenstrasse.vol.at/~mb/gpgkey.asc

Reply via email to