protected void writeTraceeContextToMessage ( Message message ) throws JMSException { if ( ! backend . isEmpty ( ) && backend . getConfiguration ( ) . shouldProcessContext ( AsyncDispatch ) ) { final Map < String , String > filteredContext = backend . getConfiguration ( ) . filterDeniedParams ( backend . copyToMap ( ) , AsyncDispatch ) ; final String contextAsString = httpHeaderSerialization . render ( filteredContext ) ; message . setStringProperty ( TraceeConstants . TPIC_HEADER , contextAsString ) ; } }
Writes the current TraceeContext to the given javaee message . This method is idempotent .