Skip to content

Latest commit

 

History

History

context-manager-servletrequest

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Maven Version

ServletRequest propagation library

Adding the servletrequest-propagation jar to your classpath provides static access to the current ServletRequest via the ServletRequestContextManager.currentServletRequest() method if the ServletRequestContextFilter was applied to the inbound request.

How to use this library

  1. Add it to your classpath.

    <dependency>
        <groupId>nl.talsmasoftware.context</groupId>
        <artifactId>servletrequest-propagation</artifactId>
        <version>[see Maven badge above]</version>
    </dependency>
  2. Include the ServletRequestContextFilter in your application.

Done!

Now the ServletRequestContextManager.currentServletRequest() is propagated into each snapshot created by the ContextSnapshot.capture() method.
This includes all usages of the ContextAwareExecutorService.