intimated ==
notified??
So what I understand is this:
A user visits your site and is given a session. When they are given the session, the session id is also associated with a socket that is opened to.... somewhere else. Each time they visit, the socket is used for... something. When the session expires, you want the socket to be closed, but this fails when Tomcat crashes.
If it's possible in your solution, I'd use a socket pool (like a database pool) rather than associating a single socket with a single session. That's where the problem appears to be. I know this isn't your question, but I have a large problem with maintaining an open socket mapped to a session id.
Dave