* @param attributes
*/
public void replicateSession(String contextPath, String id, int maxInactiveInterval,
Map<String, SessionAttributeHolder> attributes) {
log.debug("Replicating session " + id + " in context " + contextPath);
SessionProvider sessionProvider = getSessionProvider(contextPath);
if (sessionProvider == null) {
log.warn("Couldn't find session provider for context " + contextPath);
} else {
HttpSession session = sessionProvider.getSession(id, true);
session.setMaxInactiveInterval(maxInactiveInterval);
for (Entry<String, SessionAttributeHolder> entry : attributes
.entrySet()) {
session.setAttribute(entry.getKey(), entry.getValue());
}