Hi Ian,

You might try to use the HttpSessionBindingListener interface. You can
put and object in the session context that implements this interface and
when the session is timed out, it will be notified through a
valueUnbound() call nad inside this method you can remove the entry from
the database table.

I hope this helps,
Dan
-------------------------------------------
Daniel Lopez Janariz ([EMAIL PROTECTED])
Web Services
Computer Center
Balearic Islands University
-------------------------------------------

> Ian Graham wrote:
>
> Hi Everyone,
>
> I have looked through all the emails that are raging at the moment
> about session timeouts. I have a similar problem but when the session
> times out I have to remove his entry from a database table.
>
> Basically the scenario is this:
>
> The user logs into the system and an entry is added to a table (used
> to ensure that no one person can login twice)
> He/she makes use of the system and then he could use the logout button
> which would clear the table, or the session out timeout and then he
> try's to use the system again, but he is returned back to the login
> screen (and his entry in the table is removed). What I can't work out
> how to do is if the user just closes his window or types in another
> URL etc how can I trap that and remove his entry from the table.
>
> Is there an function that can be written in the sessioned bean that
> when the session times out that function is ran and clears up after
> itself???
>
> The only other solution I can think of is to date/time stamp the entry
> in the login table and everytime an operation is carried out this is
> updated, and then in the background have a routine which is clearing
> out this table....
>
> Any help would be greatly appreciated,
> Ian

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to