String sessionId = event.getSession().getId();
Object obj = session.getAttribute( PentahoSystem.PENTAHO_SESSION_KEY ); //$NON-NLS-1$
if ( obj != null ) {
IPentahoSession userSession = (IPentahoSession) obj;
PentahoSystem.invokeLogoutListeners( userSession );
userSession.destroy();
} else {
String[] info = PentahoHttpSessionListener.getSessionInfo( sessionId );
if ( info != null ) {
String instanceId = info[5];
String userId = info[3];