updating value in all session  
Author Message
brian





PostPosted: 2003-12-1 19:48:00 Top

java-programmer, updating value in all session Hi, I am a little stumped on this one, and I was hoping someone else
out there ran into and solved this problem. Using a J2EE servlet
container every client (browser) will acquire a session and certain
values will be stored in this session. However, if a certain
parameter is changed it should invoke a method in one of the beans in
the session, which all sessions will have. This sounds like more like
a type of event handler, but I am not aware of any non-gui event
listeners. Any ideas?

Regards,
Brian
 
Sudsy





PostPosted: 2003-12-1 21:45:00 Top

java-programmer >> updating value in all session Brian S. Paskin wrote:
> Hi, I am a little stumped on this one, and I was hoping someone else
> out there ran into and solved this problem. Using a J2EE servlet
> container every client (browser) will acquire a session and certain
> values will be stored in this session. However, if a certain
> parameter is changed it should invoke a method in one of the beans in
> the session, which all sessions will have. This sounds like more like
> a type of event handler, but I am not aware of any non-gui event
> listeners. Any ideas?

I hate to ask the obvious but if all of your clients are keeping the
same variable in the session context, does it really belong there?
IOW why can't the clients invoke a global method to retrieve the
value as they require it? Trying to set up a listener in every
session for changes to a global variable just seems to me like the
tail wagging the dog. YMMV.

 
Michael Borgwardt





PostPosted: 2003-12-1 21:56:00 Top

java-programmer >> updating value in all session Sudsy wrote:
> I hate to ask the obvious but if all of your clients are keeping the
> same variable in the session context, does it really belong there?
> IOW why can't the clients invoke a global method to retrieve the
> value as they require it?

i.e. use the application context.