| Author |
Are Session Activation Listeners configured in DD?
|
Otto Teixeira
Greenhorn
Joined: Aug 10, 2005
Posts: 12
|
|
Hello all, reading HFS&JSP, page 254 says (bottom box): "You do not configure session binding listeners in the DD". The errata says that should instead say: "You do not configure session binding listeners or session activation listeners in the DD". But then, on page 261, there is a Dog class that implements both HttpSessionBindingListener and HttpSessionActivationListener. In the bottom of the page, the listener IS CONFIGURED in the DD, and the box right of it says that is MUST be configured because of the Activation listener. The errata doesn't say anything about this page. So, after all, HttpSessionActivationListener's are configured or not in the DD? I'll probably never use that, but it's in the exam... Thank you
|
 |
Kerry Wilson
Ranch Hand
Joined: Oct 29, 2003
Posts: 251
|
|
You would not setup SessionBindingListener in DD. The HttpSession object should take care of this itself. The HttpSession implementation should work something like the following:
|
http://www.goodercode.com
SCJP 1.4
|
 |
Kerry Wilson
Ranch Hand
Joined: Oct 29, 2003
Posts: 251
|
|
|
SessionActivation Listeners are configured in the DD
|
 |
Otto Teixeira
Greenhorn
Joined: Aug 10, 2005
Posts: 12
|
|
So the book is correct and its errata is incorrect? PS: You read the errata, didn't you?
|
 |
Pawan Ramchandani
Ranch Hand
Joined: Aug 15, 2003
Posts: 78
|
|
|
Book is correct
|
Pawan Ramchandani<br />*******************************<br />SCJP 1.4<br />SCWCD <br />*******************************<br />Everything is okay in the end. If it's not okay, then it's not the end.
|
 |
Edmund Yong
Ranch Hand
Joined: Nov 16, 2003
Posts: 164
|
|
The errata is correct. Both the HttpSessionBindingListener and HttpSessionActivationListener are NOT configured in the DD. They should be implemented by the attribute class. But HttpSessionListener and HttpSessionAttributeListener must be registered in the DD.
|
SCJP 1.2, SCWCD 1.4
|
 |
Otto Teixeira
Greenhorn
Joined: Aug 10, 2005
Posts: 12
|
|
Hi Edmund, I actually found the answer from another post, when you asked that question yourself. Thank you very much.
|
 |
 |
|
|
subject: Are Session Activation Listeners configured in DD?
|
|
|