So what you're saying is that if you use a heartbeat of about 5 seconds (so
you don't overload your network with heartbeats) and then allow the user to
miss, oh let's say 6 heartbeats just for the sake of argument to make sure
it's not the insanely heavy network traffic that's in the way, your user
will be marked as go 30 seconds after his last confirmed heartbeat. Seems
like I have the same time lag and I didn't have to do any extra programming
to achieve it. =8^)
(*Chris*)
----- Original Message -----
From: "Ron Reynolds" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 04, 1999 6:32 AM
Subject: Re: [Session tracking]
> a heart-beat would do it. if, after x seconds, you don't receive a
> heartbeat from your applet you can assume either (a) insanely heavy
network
> traffic, (b) client machine is unbelievably bogged down to a point where
the
> applet can't get a time slice, or (c) the client machine is dead and/or
> disconnected from the network. combine that with simple ping and you can
> even determine the difference between the browser being off and the
computer
> being off (again, assuming a stable, non-flooded network). (the other
way,
> even without power failures, is to terminate the browser process
directly).
> ................ron.
>
> -----Original Message-----
> From: Chris Pratt <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Friday, December 03, 1999 8:33 PM
> Subject: Re: [Session tracking]
>
>
> >This still doesn't catch power failures. So, I guess there is really no
> >sure way.
> > (*Chris*)
> >
> >----- Original Message -----
> >From: "Ted Neward" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Friday, December 03, 1999 8:14 PM
> >Subject: Re: [Session tracking]
> >
> >
> >> You *can* get guaranteed notification by placing a non-visible applet
on
> >> the page that opens a socket back to the server, and fires a message
down
> >> the socket on closing; the HTML browsers are required to call the
> applet's
> >> "stop" method when it terminates for any reason, either leaving the
page
> >> or closing the browser.
> >>
> >> Unless somebody knows better re: the "browser-applet" specification....
> >>
> >> Ted Neward
> >> http://www.javageeks.com/~tneward
> >>
> >>
> >> On Fri, 3 Dec 1999, Thor HW wrote:
> >>
> >> > You cannot tell when the browser closes, there are many hacks, but
none
> >are
> >> > foolproof.
> >> > If you maintain a session object (your own, with state info) and if
> they
> >> > need to identify themselves somehow, you can restart an old session,
or
> >> > invalidate it.
> >> > If you are tracking anonymous users, you are out of luck. You could
> try
> >and
> >> > set a long lived cookie, but they might have cookies off, which is a
> >default
> >> > for AOL users.
> >> >
> >> > Thor HW
> >> > ----- Original Message -----
> >> > From: kavitha ramasamy <[EMAIL PROTECTED]>
> >> > To: <[EMAIL PROTECTED]>
> >> > Sent: Friday, December 03, 1999 12:23 PM
> >> > Subject: Re: [Session tracking]
> >> >
> >> >
> >> > > The value unBound is called only at two places
> >> > > 1)when I am reloading the same session
> >> > > 2)when the session expires.
> >> > >
> >> > > My problem is if the user closed the browser window , I need to
> >release
> >> > the
> >> > > resource relevant to that session which I created at the time of
> >opening.
> >> > >
> >> > > I cannot even invalidate my previous session because the intention
of
> >this
> >> > > work is to prevent multisession on the same user.
> >> > > If the user had a session, he cannot opened the next session.so the
> >> > resource
> >> > > should be released once the browser closed(clint exit)
> >> > >
> >> > > Thanks and Regards
> >> > > kavitha
> >> > >
> >> > >
> >> > > >
> >> > > >Make your session resource class "implements
> >HttpSessionBindingListener"
> >> > > >
> >> > > >and have the valueUnbound do your cleanup.
> >> > > > public void valueUnbound (HttpSessionBindingEvent event){
> >> > > > // Clean up everything in this session
> >> > > > // save or rollback changes, etc.
> >> > > > destroy();
> >> > > > }
> >> > > >
> >> > > >You can read the Javadoc on HttpSessionBindingListener for
details.
> >> > > >
> >> > > >Thor HW
> >> > > >
> >> > > >----- Original Message -----
> >> > > >From: Pankaj <[EMAIL PROTECTED]>
> >> > > >To: <[EMAIL PROTECTED]>
> >> > > >Sent: Friday, December 03, 1999 8:41 AM
> >> > > >Subject: Re: [Session tracking]
> >> > > >
> >> > > >
> >> > > > > kavitha ,
> >> > > > >
> >> > > > > if you search the list archives for last month you will find
out
> a
> >> > long
> >> > > > > discussion of this same problem which states under the subject
> >> > "Browser
> >> > > > > shutdown..." that there is no guaranteed way of knowing that
> >client is
> >> > > >no
> >> > > >more
> >> > > > > interested in using your site. Please search the archives for
the
> >> > same.
> >> > > > >
> >> > > > > Pankaj.
> >> > > > >
> >> > > > > kavitha ramasamy <[EMAIL PROTECTED]> wrote:
> >> > > > > Hi,
> >> > > > >
> >> > > > > I am designing that user login system, where same user
cannot
> >make
> >> > > > > multiple sessions(multiple entries with the same name). When a
> >> > > >particular
> >> > > > > user is making a session, the user information is logged into
the
> >> > table
> >> > > >and
> >> > > > > released from the tablewhen the user closed the session.
> >> > > > >
> >> > > > > Here if the user close the system(prpoer logout of the
> >system),then it
> >> > > >is
> >> > > > > releasing all resources,woking fine.
> >> > > > >
> >> > > > > Once the user made the session, if he close the browser
> window(not
> >> > > >proper
> >> > > > > logout), I need to release the resources (session is still
there)
> >> > before
> >> > > > > session time out.
> >> > > > >
> >> > > > > How can I release the resources if the user closes the browser
> >window
> >> > > > > before the session time out.
> >> > > > >
> >> > > > > Any help will be greatly appreciated
> >> > > > > Thanks
> >> > > > > kavitha
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > >
> >> > >
> >> >
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html