public Subject replaceInvocationSubject ( Subject invocationSubject ) { SubjectThreadContext subjectThreadContext = getSubjectThreadContext ( ) ; Subject replacedInvocationSubject = subjectThreadContext . getInvocationSubject ( ) ; subjectThreadContext . setInvocationSubject ( invocationSubject ) ; return replacedInvocationSubject ; }
Replaces the invocation subject on the thread and returns the replaced subject .