hi there,
I was concerned with the same probleme for a while. And this was mainly because the HF states a HttpSessionActivationListener can be both, an attribute class instance bound to a session AND "some other class". They even give an example on that (HF SCWCD pp. 261).
That's confusing and may explain bernards original post. By now I guess the HF is wrong - only attribute classes can implement HttpSessionActivationListener in a meaningful way.
Justification:
1) The spec says that and nothing else.
2) I tried it with Tomcat, attribute classes where triggered correctly, "some other classes", properly declared in the DD, not. OK, I didn't run a cluster to test this. I redeployed a single instance to trigger the passivation and activation of the session, thus the test is not perfect.
3) What will happen, if the attribute class has not the no-arg constructor and is registered as HttpSessionActivationListener in the DD (as suggested in the HF)? How will the container create an instance to call its methods?
Has anyone out there ever seen a HttpSessionActivationListener declared in the DD but not bound to a session triggered?
Chris