Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSessionBindingListener Instance

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a class implements HttpSessionBindingListener Interface and the Instance of this class is bound to the session object, will there be only a single instance in the session. In other words how many instances of a class that implements HttpSessionBindingListner Interface can exist at a time with in a session.

Thanks in advance
 
Sanjeev BhimaRao
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As many as you create.

in HFSJ parlance,
If we have 10 Dog objects and we attach all 10 to the session, there will be 10 such objects in the session.
 
Sayak Banerjee
Ranch Hand
Posts: 292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In other words how many instances of a class that implements HttpSessionBindingListner Interface can exist at a time with in a session.

As many instances of that class bound to the session scope....remember an instance of the listener is nothing but the instance of the session atrribute object itself since the class of this object implements HttpSessionBindingListener
 
Bob CHOI
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
unlimited instances as many as the application creates for the container injects none of them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic