• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Listener instances

 
sethuraman sukumaran
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many instances of the listener class will be created by the container.

In other words are the instance variables defined in the listener class thread safe ?

There is a listener class which implements HttpSessionListener. Will there be as many instances of the listener as the number of sessions ?
 
Ner min
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in a single JVM enviroment only one.
anything else wouldnt make sence couse o wouldnt even be able to say how many sessions r online/created. If u dont tuch the propertys by youre self should be thread safe.

on multi JVM enviroment i m not sure
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic