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

Listners doubts!!!

 
Amitkumar Dhama
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have some doubts about listners...
-->>

following statments are given in the HF's book....

1.HttpSessionListner Implemented by attribute class

2.HttpSessionActivationListner Implemented by xxxxxx

3.HttpSessionBindingListner Implemented by Some Other Class

4.HttpSessionAttributeListner Implemented by attribute class

My Ist ques is what are these classes, and by which class HttpSessionActivationListner will be implemented???

and IInd ques.. The statment "Only listner that is not configured in the DD is HttpSessionBindingListner" is correct or not means is there any other listner???

Thanking in advance....
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The statment "Only listener that is not configured in the DD is HttpSessionBindingListner" is correct or not means is there any other listner???


This is not correct. You don't have to configure HttpSessionActivationListener in DD.

Except these two listeners rest of the Listeners have to configured in DD in order to receive Events.
 
Frederik Ericsson
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not the only...

Discussed b4 as well. Anyway am quating here as well.

2 listeners,

HttpSessionActivationListener
HttpSessionBindingListener

with regards,
Chiyan
 
Amitkumar Dhama
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the HF's book one class is given that implements both
1.HttpSessionActivationListner
and 2.HttpSessionBindingListner

and it is configured in the DD and it is written there that it has to be configured in the DD only because of the HttpSessionActivationListner..

My first ques is still unanswered, Which type of class Implements HttpSessionActivationListner please do reply???

I had attended the previous discussion of this topic that's why this question has striked me....

Thanks for the response...
 
Priyank Nautiyal
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amit,
Answering your first question.If you want a particular class in your application to be notified when a session is activated that class should implement HttpSessionActivationListner. This could be because you may want to perform certain actions or checks in the class at the time the session is activated on the JVM. It can be any normal Java class, which is deployed inside the servlet container.
Hope this answers your question.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic