return the best available mutex for the given session : that is , an object to synchronize on for the given session . returns the session mutex attribute if available ; usually , this means that the httpsessionmutexlistener needs to be defined in web.xml . falls back to the session reference itself if no mutex attribute found . the session mutex is guaranteed to be the same object during the entire lifetime of the session , available under the key defined by the session_mutex_attribute constant . it serves as asafe reference to synchronize on for locking on the current session . in many cases , the session reference itself is a safe mutex as well , since it will always be the same object reference for the same active logical session . however , this is not guaranteed across different servlet containers ; the only 100 % safe way is a session mutex . concode_field_sep PlaceHolder placeHolder concode_field_sep WebApplicationContext getRequiredWebApplicationContext concode_elem_sep WebApplicationContext getWebApplicationContext
Object function ( FacesContext arg0 ) { Assert . notNull ( arg0 , "srini_string" ) ; ExternalContext loc0 = arg0 . getExternalContext ( ) ; Object loc1 = loc0 . getSessionMap ( ) . get ( WebUtils . SESSION_MUTEX_ATTRIBUTE ) ; if ( loc1 == null ) { loc1 = loc0 . getSession ( true ) ; } return loc1 ; }