Package org.kuali.rice.krad.web.listener
Class NonSerializableSessionListener
java.lang.Object
org.kuali.rice.krad.web.listener.NonSerializableSessionListener
- All Implemented Interfaces:
EventListener,javax.servlet.http.HttpSessionAttributeListener
public class NonSerializableSessionListener
extends Object
implements javax.servlet.http.HttpSessionAttributeListener
A session listener that detects when a non-serializable attributes is added to session.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattributeAdded(javax.servlet.http.HttpSessionBindingEvent se) voidattributeRemoved(javax.servlet.http.HttpSessionBindingEvent se) voidattributeReplaced(javax.servlet.http.HttpSessionBindingEvent se) protected voidcheckSerialization(javax.servlet.http.HttpSessionBindingEvent se, String action) Tests whether the attribute value is serializable and logs an error if it isn't.
-
Constructor Details
-
NonSerializableSessionListener
public NonSerializableSessionListener()
-
-
Method Details
-
attributeAdded
public void attributeAdded(javax.servlet.http.HttpSessionBindingEvent se) - Specified by:
attributeAddedin interfacejavax.servlet.http.HttpSessionAttributeListener
-
attributeRemoved
public void attributeRemoved(javax.servlet.http.HttpSessionBindingEvent se) - Specified by:
attributeRemovedin interfacejavax.servlet.http.HttpSessionAttributeListener
-
attributeReplaced
public void attributeReplaced(javax.servlet.http.HttpSessionBindingEvent se) - Specified by:
attributeReplacedin interfacejavax.servlet.http.HttpSessionAttributeListener
-
checkSerialization
Tests whether the attribute value is serializable and logs an error if it isn't. Note, this can be expensive so we avoid it in production environments.- Parameters:
se- the session binding eventaction- the listener event for logging purposes (added or replaced)
-