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 Details

    • NonSerializableSessionListener

      public NonSerializableSessionListener()
  • Method Details

    • attributeAdded

      public void attributeAdded(javax.servlet.http.HttpSessionBindingEvent se)
      Specified by:
      attributeAdded in interface javax.servlet.http.HttpSessionAttributeListener
    • attributeRemoved

      public void attributeRemoved(javax.servlet.http.HttpSessionBindingEvent se)
      Specified by:
      attributeRemoved in interface javax.servlet.http.HttpSessionAttributeListener
    • attributeReplaced

      public void attributeReplaced(javax.servlet.http.HttpSessionBindingEvent se)
      Specified by:
      attributeReplaced in interface javax.servlet.http.HttpSessionAttributeListener
    • checkSerialization

      protected void checkSerialization(javax.servlet.http.HttpSessionBindingEvent se, String action)
      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 event
      action - the listener event for logging purposes (added or replaced)