{
// Note that this method is called *after* the attribute has been replaced,
// and that event.getValue contains the old object.
if (event.getValue() instanceof ConversationManager)
{
ConversationManager oldConversationManager = (ConversationManager) event.getValue();
conversationWiperThread.removeConversationManager(oldConversationManager);
}
// The new object is already in the session and can be retrieved from there
HttpSession session = event.getSession();
String attrName = event.getName();
Object newObj = session.getAttribute(attrName);
if (newObj instanceof ConversationManager)
{
ConversationManager newConversationManager = (ConversationManager) newObj;
conversationWiperThread.addConversationManager(newConversationManager);
}
}