HttpSession session = req.getSession(false);
if (session != null) {
String sessionId = session.getId();
// Restore attributes in sessions of portal and all portlet applications
ServletContainerFactory.getServletContainer().visit(new SessionTaskVisitor(sessionId, new SessionTask(){
@Override
public boolean executeTask(HttpSession session) {
if (log.isTraceEnabled()) {
log.trace("Starting with restoring attributes for context: " + session.getServletContext().getContextPath());