Example usage for javax.servlet.http HttpSessionBindingEvent getName

List of usage examples for javax.servlet.http HttpSessionBindingEvent getName

Introduction

In this page you can find the example usage for javax.servlet.http HttpSessionBindingEvent getName.

Prototype

public String getName() 

Source Link

Document

Returns the name with which the attribute is bound to or unbound from the session.

Usage

From source file:org.kuali.rice.krad.web.listener.NonSerializableSessionListener.java

/**
 * 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.
 * @param se the session binding event/*from   w ww.j  av a  2  s  .c o  m*/
 * @param action the listener event for logging purposes (added or replaced)
 */
protected void checkSerialization(final HttpSessionBindingEvent se, String action) {
    final Object o = se.getValue();
    if (o != null) {
        if (!isSerializable(o)) {
            LOG.error("Attribute of class " + o.getClass().getName() + " with name " + se.getName()
                    + " from source " + se.getSource().getClass().getName() + " was " + action
                    + " to session and does not implement " + Serializable.class.getName());
        } else if (!canBeSerialized((Serializable) o)) {
            LOG.error("Attribute of class " + o.getClass().getName() + " with name " + se.getName()
                    + " from source " + se.getSource().getClass().getName() + " was " + action
                    + " to session and cannot be Serialized");
        }
    }
}

From source file:org.projectforge.web.debug.SessionSerializableChecker.java

/**
 * @see javax.servlet.http.HttpSessionAttributeListener#attributeAdded(javax.servlet.http.HttpSessionBindingEvent)
 *//*from  w  w  w  .  j av a  2  s. c o m*/
public void attributeAdded(final HttpSessionBindingEvent evt) {
    if (WebConfiguration.isDevelopmentMode() == true) {
        check(evt.getSession(), evt.getName(), evt.getValue());
    }
}

From source file:org.projectforge.web.debug.SessionSerializableChecker.java

/**
 * @see javax.servlet.http.HttpSessionAttributeListener#attributeReplaced(javax.servlet.http.HttpSessionBindingEvent)
 *//*from ww w.ja  v  a  2  s  . c  o  m*/
public void attributeReplaced(final HttpSessionBindingEvent evt) {
    if (WebConfiguration.isDevelopmentMode() == true) {
        check(evt.getSession(), evt.getName(), evt.getValue());
    }
}