Issues with request scoped beans in a new subscription manager flow in azure
The new SubscriptionManager flow runs outside of dispatcher servlet (http flow). Because of this, when we try to use any flow which implies usage of some request scoped beans, we get an error like this:
No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
An example of affected beans:
org.opengroup.osdu.core.common.http.UrlFetchServiceImpl
,
org.opengroup.osdu.core.common.http.HttpClientHandler
,
org.opengroup.osdu.core.common.logging.JaxRsDpsLog