Re: RE: RE: The right place/time to clean up a session before session tim e out, or user logoff

2002-09-23 Thread Tony Baity


Vernon,
Yes, there are some possible timing issues with using object references attached to 
the session in any class implementing HttpSessionBindingListener. I believe that the 
order which references are unbound is unpredictable. 
When I did this, I ran into the same problem and compromised by using a constructor 
that would copy any reference that I might need for the session, inside the class 
implementing HttpSessionBindingListener.

But... from a bird's eye view of this issue, I see that MVC, as used with servlet 
programming, appears to not be a complete solution for creating "action"s that are 
generated from clock events that need to interact with stateful data used by "action"s 
from user events. 

I would like to see a way to reuse a Struts action by a listener, etc. and set it up 
all within the struts_config. 

I do not want to turn Struts into daemon or anything like that. But it would be nice 
if it's footprint of responsibility might cover some of these other events that are 
not strictly MVC-user requests.

-Tony

 Vernon Wu wrote:
Jason,

Now, I see what you're doing here. Rather than calling the session invalidate method 
in the log off, you call the method 
to clean up the session. That is some thought. I, however, think there shall be a more 
straight forward solution than 
twise thing around by the servlet desing.

Thanks for explaining your solution.

Vernon

9/23/2002 7:31:36 PM, "Miller, Jason" wrote:





--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



-
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!


RE: RE: The right place/time to clean up a session before session tim e out, or user logoff

2002-09-23 Thread Miller, Jason

What do you have stored in the session that has to be checked on?

I only need the reference to my UserProxy object, so I call the logoff
method like so:

Security.doUserLogoff( this );

if you need other things that are in the session, is it feasible to keep
them elsewhere and key
them by whatever object you are implementing the listener with?  Or can you
make them all listen?
that seems unwieldy, though.

___
I have tried something similar with yours: a object stored in the session
and with a HttpSessionBindingListener 
implementation. When the invalidate method is called in the logoff action,
it is too late for the valueUnbound method to 
retrieve anything from the session since it is invalid already.

9/23/2002 2:56:58 PM, "Miller, Jason" <[EMAIL PROTECTED]> wrote:





--
To unsubscribe, e-mail:

For additional commands, e-mail: