Hi Etienne
There is already an issue: https://www.canoo.com/jira/browse/UBA-807.
It is not safe to invalidate the session at the application level in
IApplication#stop(). Even after the stop request, there is still some
protocol left at the connector level.
So, to invalidate the session you will need to extend
ServletContainerAdapterHelper:
public class YourServletContainerAdapter extends HttpServlet {
private YourServletContainerAdapterHelper fHelper;
public void init() throws ServletException {
fHelper = new YourServletContainerAdapterHelper(getServletConfig());
}
protected void service(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
if (!fHelper.service(request, response, getServletConfig())) {
super.service(request, response);
}
}
}
public class YourServletContainerAdapterHelper extends
ServletContainerAdapterHelper {
protected ContainerCommand createStopCommand() throws ServletException {
return new YourRemoveSessionCommand(this);
}
}
public class YourRemoveSessionCommand extends RemoveSessionCommand {
public YourRemoveSessionCommand(ICommandInfo commandInfo) {
super(commandInfo);
>>>>>> ServletContainerContext.getHttpSession().invalidate();
}
protected void handleRequestContent(IObjectInputStream in) throws
ServletException, IOException {
super.handleRequestContent(in);
}
}
I hope this helps.
Thanks and regards,
Janak
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Etienne Studer
Sent: Friday, October 20, 2006 4:46 AM
To: [email protected]
Subject: [ULC-developer]
ServletContainerContext.getHttpSession().invalidate()
Hi ULC Team
Is it safe to call ServletContainerContext.getHttpSession().invalidate()
within IApplication#stop()?
Thanks, Etienne
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer