Session termination code
Session termination code
- Subject: Session termination code
- From: "Paul-Liviu Petrus" <email@hidden>
- Date: Fri, 16 May 2003 18:05:05 +0200
- Thread-topic: WOResourceURL causing IllegalStateException
Hi all,
In my app, the users have a flag 'online' in the database, which is set
to 1 when the user logs on and should be set to 0 when he/she logs off.
I implemented the method session.terminate() to do the job.
public void terminate()
{
// ...
authPerson.setOnline( new Integer( 0 ) );
authPerson.setLogoutTime( today );
//...
defaultEditingContext().saveChanges();
super.terminate();
}
When the user logs out 'normally', this works. The problem is, when he
doesn't logout, but simply closes the browser, then the method
terminate() is not automatically called by the server, even if the
session is destroyed (according to the docs) after timeout() and he
stays 'online'.
Is there another method, which _is_ called when a session is destroyed
and where I could put my code? I didn't find anything yet.
Thanks a lot
Paul.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.