@Override public void afterDestroy(EntryEvent<String, HttpSession> event) { // A Session expired. If it was destroyed by GemFire expiration, process it. // If it was destroyed via Session.invalidate, ignore it since it has // already been processed. DeltaSessionInterface session = null; if (event.getOperation() == Operation.EXPIRE_DESTROY) { session = (DeltaSessionInterface) event.getOldValue(); } else { /* * This comes into play when we're dealing with an empty client proxy. We need the actual * destroyed object to come back from the server so that any associated listeners can fire * correctly. Having the destroyed object come back as the callback arg depends on setting the * property gemfire.EXPIRE_SENDS_ENTRY_AS_CALLBACK. */ Object callback = event.getCallbackArgument(); if (callback != null && callback instanceof DeltaSessionInterface) { session = (DeltaSessionInterface) callback; ManagerBase m = ContextMapper.getContext(session.getContextName()); if (m != null) { session.setOwner(m); } } } if (session != null) { session.processExpired(); } }
if (session != null && !session.getContextName().isEmpty() && !getContextName().equals(session.getContextName())) { getLogger() .info(this + ": Session " + id + " rejected as container name and context do not match: " + getContextName() + " != " + session.getContextName()); session = null;
public void afterDestroy(EntryEvent<String, HttpSession> event) { // A Session expired. If it was destroyed by GemFire expiration, process it. // If it was destroyed via Session.invalidate, ignore it since it has // already been processed. DeltaSessionInterface session = null; if (event.getOperation() == Operation.EXPIRE_DESTROY) { session = (DeltaSessionInterface) event.getOldValue(); } else { /* * This comes into play when we're dealing with an empty client proxy. We need the actual * destroyed object to come back from the server so that any associated listeners can fire * correctly. Having the destroyed object come back as the callback arg depends on setting the * property gemfire.EXPIRE_SENDS_ENTRY_AS_CALLBACK. */ Object callback = event.getCallbackArgument(); if (callback != null && callback instanceof DeltaSessionInterface) { session = (DeltaSessionInterface) callback; ManagerBase m = ContextMapper.getContext(session.getContextName()); if (m != null) { session.setOwner(m); } } } if (session != null) { session.processExpired(); } }
if (session != null && !session.getContextName().isEmpty() && !getContextName().equals(session.getContextName())) { getLogger() .info(this + ": Session " + id + " rejected as container name and context do not match: " + getContextName() + " != " + session.getContextName()); session = null;