File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HttpSessionActionListener and DD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HttpSessionActionListener and DD" Watch "HttpSessionActionListener and DD" New topic
Author

HttpSessionActionListener and DD

Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
I got a questiona that "HttpSessionActivationListerner" is "NOT" declared in DD like HttpSessionBindingListener (i.e jdiscuss mocks).

But HFSJ says that this class is session related class and MUST be declared in DD.

What is the correct?

Tks.


SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
Gab Buda
Greenhorn

Joined: Mar 25, 2006
Posts: 24
HttpSessionActivationListener and HttpSessionBindingListener are not configured in the DD.

You're right for HFSJ, but there's an errata:
http://www.oreilly.com/catalog/headservletsjsp/errata/headservletsjsp.confirmed

Gabb
[ April 02, 2006: Message edited by: gabb buda ]

SCJP 1.4 (85%)<br />SCWCD 1.4 (94%)
Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
Ah, ok "Gabb", that�s very important, tks.


"You do NOT configure session binding listeners in the DD! ... But this is NOT true for the other session related listeners on the previous page. HttpSessionListener, HttpSessionAttributeListener, and HttpSessionActivationListener must be registered in the DD, since they're related to the session itself, rather than an individual
attribute placed in the session."

Should read:

""You do NOT configure session binding listeners OR SESSION ACTIVATION LISTENERS in the DD! ... But this is NOT true for the other session related listeners on the previous page. HttpSessionListener and HttpSessionAttributeListener must be registered in the DD, since they're related to the session itself, rather than an individual attribute placed in the session."
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

HttpSessionActivationListener and HttpSessionBindingListers are implemented by the attributes added to the session scope. And these listeners are activated when the attribute of these type is bounded/unbounded to session and session is migrated. The attribute class is notified.

Thanks


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: HttpSessionActionListener and DD