I'm looking to figure out if it's possible to do the following:
Obviously, you can use the HttpSessionAttributeListener to determine which attribute has changed. However, it doesn't return the new value but rather the old one.
You can use the HttpSessionEvent listener to determine when a session object has been changed.
Is there a way you can determine when a session object changes (and it does NOT occur when the setAttribute method is called...) and determine the updated key:value pair?
Asif Pathan wrote:Hi Minja,
Once you get the attributeReplaced() callback invoked can't you just use getAttribute(name key of attribute in question) on the HttpSession in question to get the new value? Am I missing something?
The issue is that the class(es) that would implement the attribute listener interface are not hand-coded, but generated through XSD schemas with JAXB. [not sure I should ask it in this sub-board, but...] Can these schemas be made aware of the interface (I'm sure they can) AND capable of overriding the methods? Our web application bean classes are frequently upgraded with new fields/methods upon user requests, so it's far easier to just run a JAXB automated process than hand code, obviously.