@Override public void attributeAdded( HttpSessionBindingEvent httpSessionBindingEvent) { Object value = httpSessionBindingEvent.getValue(); if ((value instanceof Serializable) || (value == null)) { return; } Class<?> clazz = value.getClass(); _log.error( clazz.getName() + " is not serializable and will prevent this session from " + "being replicated"); if (_requiresSerializable == null) { HttpSession session = httpSessionBindingEvent.getSession(); ServletContext servletContext = session.getServletContext(); _requiresSerializable = Boolean.valueOf( GetterUtil.getBoolean( servletContext.getInitParameter( "session-attributes-requires-serializable"))); } if (_requiresSerializable) { HttpSession session = httpSessionBindingEvent.getSession(); String name = httpSessionBindingEvent.getName(); session.removeAttribute(name); } }
protected HttpSessionBindingEvent getHttpSessionBindingEvent( HttpSessionBindingEvent httpSessionBindingEvent) { if (CompoundSessionIdSplitterUtil.hasSessionDelimiter()) { CompoundSessionIdHttpSession compoundSessionIdHttpSession = new CompoundSessionIdHttpSession( httpSessionBindingEvent.getSession()); httpSessionBindingEvent = new HttpSessionBindingEvent( compoundSessionIdHttpSession, httpSessionBindingEvent.getName(), httpSessionBindingEvent.getValue()); } return httpSessionBindingEvent; }
public void valueBound(HttpSessionBindingEvent arg0) { String attr = (String)arg0.getValue(); if("userlogged".equals(attr){ //do your stuff here } }
protected void dumpSessionBindingEvent(HttpSessionBindingEvent event, StringBuffer sb) { sb.append("-- Session event :").append("\n"); sb.append(" Event: attribute name: ").append(event.getName()).append("\n"); sb.append(" Event: attribute value: ").append(event.getValue()).append("\n"); }
public void attributeAdded(HttpSessionBindingEvent event) { Object obj = event.getValue(); if (!(obj instanceof Serializable)) { _log.error( obj.getClass().getName() + " is not serializable and will prevent this session from " + "being replicated"); } }
@Override public void attributeReplaced(HttpSessionBindingEvent hsbe) { HttpSession session = hsbe.getSession(); if (Objects.equals(hsbe.getName(), SamlSession.class.getName())) { unmap(session.getId(), hsbe.getValue()); map(session.getId(), session.getAttribute(SamlSession.class.getName())); } }
@Override public void attributeAdded(HttpSessionBindingEvent hsbe) { HttpSession session = hsbe.getSession(); if (Objects.equals(hsbe.getName(), SamlSession.class.getName())) { map(session.getId(), hsbe.getValue()); } }
@Override public void attributeRemoved(HttpSessionBindingEvent hsbe) { HttpSession session = hsbe.getSession(); if (Objects.equals(hsbe.getName(), SamlSession.class.getName())) { unmap(session.getId(), hsbe.getValue()); } }
@Override public void attributeReplaced(HttpSessionBindingEvent event) { if (_destroyer != null) { _destroyer.destroy(event.getName(), event.getValue()); } }
/** * Notification that an attribute has been removed from a session. Called after the attribute is * removed. * * @param event the nofication event */ public void attributeRemoved(HttpSessionBindingEvent event) { handleAttributeEvent(event.getName(), event.getValue(), ELUtils.Scope.SESSION); }
public void attributeRemoved(HttpSessionBindingEvent event) { if (_destroyer != null) { _destroyer.destroy(event.getName(), event.getValue()); } }
public void attributeReplaced(HttpSessionBindingEvent event) { if (_destroyer != null) { _destroyer.destroy(event.getName(), event.getValue()); } }
public void attributeRemoved(HttpSessionBindingEvent event) { if (_destroyer != null) { _destroyer.destroy(event.getName(), event.getValue()); } }
public void attributeReplaced(HttpSessionBindingEvent event) { if (_destroyer != null) { _destroyer.destroy(event.getName(), event.getValue()); } }
/** * Notification that an attribute has been removed from a session. * Called after the attribute is removed. * * @param event the nofication event */ public void attributeRemoved(HttpSessionBindingEvent event) { handleAttributeEvent(event.getName(), event.getValue(), ELUtils.Scope.SESSION); }
@Override public void attributeRemoved(HttpSessionBindingEvent event) { if (_destroyer != null) { _destroyer.destroy(event.getName(), event.getValue()); } }
/** * Notification that an attribute has been removed from a session. Called after the attribute is * removed. * * @param event the nofication event */ public void attributeRemoved(HttpSessionBindingEvent event) { handleAttributeEvent(event.getName(), event.getValue(), ELUtils.Scope.SESSION); }
/** * Notification that an attribute has been removed from a session. * Called after the attribute is removed. * * @param event the nofication event */ public void attributeRemoved(HttpSessionBindingEvent event) { handleAttributeEvent(event.getName(), event.getValue(), ELUtils.Scope.SESSION); }
/** * @see javax.servlet.http.HttpSessionAttributeListener#attributeReplaced(javax.servlet.http.HttpSessionBindingEvent) */ @Override public void attributeReplaced(final HttpSessionBindingEvent evt) { if (WebConfiguration.isDevelopmentMode() == true) { // TODO VF if true then UnsupportedOperationExceptions, can't serialize classes (more in class InMemoryPageStore.prepareForSerialization) check(evt.getSession(), evt.getName(), evt.getValue()); } }