I have a web application that has a Spring Integration logic running with it in a separated thread. The problem is that at some point my Spring Integration logic tries to us
You could publish the request in the new Thread like this:
import org.springframework.web.context.request.RequestContextListener;
...
ServletRequestEvent requestEvent = new ServletRequestEvent(req.getServletContext(), req);
RequestContextListener requestContextListener = new RequestContextListener();
requestContextListener.requestInitialized(requestEvent);
...
requestContextListener.requestDestroyed(requestEvent);
If you look inside requestInitialized()-method you will find a ThreadLocal-variable holding the request. Now you can autowire your request successfully.