Kevin,

Thank you. We have already implmented a thread that runs in backgroud and on
user incativity for a specified interval updates the database and logs out
the user. Thers is also an explicit LOGOUT in the front end.
Only for accidental killing of the browser I wanted to implement a method to
update the database.

Appreciate your efforts

Regards

Siva

-----Original Message-----
From: Kevin Jones [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 06, 2000 4:25 PM
To: [EMAIL PROTECTED]
Subject: Re: JspDestroy() and Bean Variable.


> HttpSessionBindingListener

That should be HttpBindingListener

Kevin Jones
DevelopMentor
www.develop.com

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Kevin Jones
> Sent: 06 September 2000 23:59
> To: [EMAIL PROTECTED]
> Subject: Re: JspDestroy() and Bean Variable.
>
>
> > The problem happens when the user kills his browse or the
> system crashes.
> We
> > wanted to capture that event and update the database.
>
> You can't capture this event - the browser won't tell you when
> the user has
> killed it (unless the browser is written by you!). The best you can do is
> put a bean into the session that implements
> HttpSessionBindingListener wait
> for the session timeout then run your sproc.
>
> JspDestroy is only going to get called once (at most, and probably never)
> when the servlet is unloaded, this is not releated to session timeout, and
> is not related to a particular user, so this approach is invalid anyway,
>
> Kevin Jones
> DevelopMentor
> www.develop.com
>
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Sivakumar
> > Sankarasubramanian
> > Sent: 06 September 2000 22:19
> > To: [EMAIL PROTECTED]
> > Subject: JspDestroy() and Bean Variable.
> >
> >
> > Hi All,
> >
> > Working on a JSP/Bean architecture. This is a database driven search
> > application. When the user logs into the database, we are
> > tracking his usage
> > with an entry in the database and when he logs out we update the
> > database by
> > putting the end time. If he times out, then we measure some period of
> > inactivity and then update the database.
> > The problem happens when the user kills his browse or the system
> > crashes. We
> > wanted to capture that event and update the database.
> >
> > I've used JspDestroy() to call a method that inturn calls a
> > stored procedure
> > to update the database. Now this method( setLogOut()) has to pick
> > a variable
> > from the bean which has to be used to update that particular row in the
> > table.
> >
> > I'm not able to access the beans from JspDestroy(). I tried putting that
> > variable in session using session.setAttribute(), but session is not
> > accessible in the JspDestroy().
> >
> > Am I missing something.
> >
> > "All I need is the variable from the bean to be accessible to my
> > JspDestroy()"
> >
> > Regards
> >
> > Siva
> >
> > PharmQuest Corporation
> >
> > ==================================================================
> > =========
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to