Terminating a session remotely

Hi,

I have a web application that writes back to a database shared by a desktop application. A user will enter data on the web, and then likely call me to finalise a transaction. I will then use the desktop application.

Is there any way that I can terminate the user's session from my desktop app? The session has a listener which writes all data through to the database when the session is terminated, but at present I am waiting for the session timeout. (window closing does not always work because of dial-up modems etc).

Thanks

codemwnci

[573 byte] By [codemwncia] at [2007-10-3 2:32:45]
# 1

What language is the desktop app in? Where is the Web Server in relation to your desktop app?

If it's all Java, you could have a class that's accessible via RMI that calls session.invalidate(). Otherwise, a servlet that does the same would work. You'll need the user's session ID.

Brian

brian@cubik.caa at 2007-7-14 19:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
You could try spoofing the web client session. If you knew the sessionid that you wanted to invalidate you could use the HttpUrlConnection class to submit a request using that sessionid to a servlet that would then invalidate the session.
tolmanka at 2007-7-14 19:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...