Developing contextual proxies
Use a work manager as a ContextService to contextualize invocation of an interface.
About this task
Application components that require thread context to be present when methods of an object are invoked can use a work manager, which implements javax.enterprise.concurrent.ContextService, to construct a contextual proxy for the object. Thread context is captured, per the settings of the work manager, when the contextual proxy is created. When interface methods are invoked on the contextual proxy, the previously captured thread context is applied prior to invocation and restored afterward.