public HashMap < String , Object > saveContextData ( ) { HashMap < String , Object > contextData = new HashMap < String , Object > ( ) ; //Save off the data from the other components we have hooks into ComponentMetaDataAccessorImpl cmdai = ComponentMetaDataAccessorImpl . getComponentMetaDataAccessor ( ) ; ComponentMetaData cmd = cmdai . getComponentMetaData ( ) ; if ( cmd != null ) { contextData . put ( ComponentMetaData , cmd ) ; } //Each producer service of the Transfer service is accessed in order to get the thread context data //The context data is then stored off Iterator < ITransferContextService > TransferIterator = com . ibm . ws . webcontainer . osgi . WebContainer . getITransferContextServices ( ) ; if ( TransferIterator != null ) { while ( TransferIterator . hasNext ( ) ) { ITransferContextService tcs = TransferIterator . next ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Calling storeState on: " + tcs ) ; } tcs . storeState ( contextData ) ; } } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "No implmenting services found" ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Saving the context data : " + contextData ) ; } return contextData ; }
Save off the context data for the current thread