RE: JSP, sessions: how to notify bean about the session end?

2001-03-14 Thread Michael Wentzel

> Any examples or resources for this?
> 
> William Brogden wrote:
> 
> > 
> > "Sergey V. Udaltsov" wrote:
> > 
> >> Hello all
> >> 
> >> My JSPs uses some session-scoped bean. This bean, among 
> other duties, is
> >> responsible for logging in and out of some app server. I 
> would like the
> >> bean to perform autologout on the session end. Is it possible? How?
> >> AFAIK usual finalize can be called ages after the object 
> is really free
> >> - so I do not like this way. Any ideas?
> >> 
> >> Regards,
> >> 
> >> Sergey
> >> 
> > 
> > Take a look at the HttpSessionBindingListener interface. If your
> > Bean implements this class, you can get a notification when
> > the session times out or is otherwise invalidate.

What kind of examples/resources do you need?  All you should need is
public class MyBean implements javax.servlet.http.HttpSessionBindingListener
[,]

and then implement the valueUnbound and valueBound methods in your bean.


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com
mailto:[EMAIL PROTECTED]

- Punisher of those who cannot spell dumb!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: JSP, sessions: how to notify bean about the session end?

2001-03-14 Thread Tony Keith

Any examples or resources for this?

William Brogden wrote:

> 
> "Sergey V. Udaltsov" wrote:
> 
>> Hello all
>> 
>> My JSPs uses some session-scoped bean. This bean, among other duties, is
>> responsible for logging in and out of some app server. I would like the
>> bean to perform autologout on the session end. Is it possible? How?
>> AFAIK usual finalize can be called ages after the object is really free
>> - so I do not like this way. Any ideas?
>> 
>> Regards,
>> 
>> Sergey
>> 
> 
> Take a look at the HttpSessionBindingListener interface. If your
> Bean implements this class, you can get a notification when
> the session times out or is otherwise invalidate.

> 
-- 
Tony Keith


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: JSP, sessions: how to notify bean about the session end?

2001-03-14 Thread William Brogden



"Sergey V. Udaltsov" wrote:
> 
> Hello all
> 
> My JSPs uses some session-scoped bean. This bean, among other duties, is
> responsible for logging in and out of some app server. I would like the
> bean to perform autologout on the session end. Is it possible? How?
> AFAIK usual finalize can be called ages after the object is really free
> - so I do not like this way. Any ideas?
> 
> Regards,
> 
> Sergey
> 

Take a look at the HttpSessionBindingListener interface. If your
Bean implements this class, you can get a notification when
the session times out or is otherwise invalidated.

-- 
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]