public static Object runAsServer ( ) { LinkedHashMap < ThreadIdentityService , Object > token = null ; if ( ! checkForRecursionAndSet ( ) ) { try { for ( int i = 0 , size = threadIdentityServices . size ( ) ; i < size ; ++ i ) { ThreadIdentityService tis = threadIdentityServices . get ( i ) ; if ( tis . isAppThreadIdentityEnabled ( ) ) { if ( token == null ) { token = new LinkedHashMap < ThreadIdentityService , Object > ( ) ; } token . put ( tis , tis . runAsServer ( ) ) ; } } } finally { resetRecursionCheck ( ) ; } } return token == null ? Collections . EMPTY_MAP : token ; }
Set the server s identity as the thread identity .