updating value in all session

  • Thread starter Brian S. Paskin
  • Start date
B

Brian S. Paskin

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
 
S

Sudsy

Brian said:
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.
 
M

Michael Borgwardt

Sudsy said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top