Hi Fotis, One relative question about using sessions: Should in this case the persistent storage of the context be disabled in Tomcat 6.0? (This is enabled by default)
Thanks George --- In [email protected], Fotis Chatzinikos <fotis.chatzini...@...> wrote: > > If you are using sessions you can add a session destroy filter in tomcat > that retrieves the user id from the session and updates the db that the user > has logged out - that will work - the only problem is that if you use a long > session timeout your db field will be updated at the end of this period... > > On Thu, Jan 21, 2010 at 11:14 AM, GeorgeB <grg_b...@...> wrote: > > > > > > > Hi all, > > > > I think it has been asked before but I don't recall any answer as this is: > > 1. Not a Flex directly related issue, > > 2. Not even a BlazeDS issue per se, > > > > My client-server application depends on a Flex client and a Tomcat + > > BlazeDS + MySQL + Hibernate backend server. It tracks whether a user is > > logged in by keeping a "InSession" boolean field in the database. > > This "InSession" starts the session clock by the time the user has properly > > logged in and stops by the time he has properly logged out by "Exit" the > > app. > > Then the database is updated and that user is marked as "InSession=false", > > while that session has been timed. > > > > But if the communication channel goes down (Internet, LAN, etc), or the > > client's browser is inadvertently force closed, the database loses > > track/sync of the user and keeps reporting as "InSession=true", while > > session time keeps running indefinately. > > > > What I need is a server side procedure that: > > 1. Either catch an exception on losing connection event, or > > 2. in a continuous loop scans for connected users (out of a list of > > "InSession=true") > > > > Obviously losing the client-server connection is a very generalized problem > > to track and needs more specific solutions. I am not sure if this can be > > solved in BlazeDS level, or I have to go to WEB server sockets. But may I > > ask if anyone has a suggestion, or some relevant documentation for me to > > study? > > > > Thanks all > > George > > > > > > > > > > -- > Fotis Chatzinikos, Ph.D. > Founder, > LivinData Technologies > www.styledropper.com > fotis.chatzini...@..., >

