Announcement Announcement Module
Collapse
No announcement yet.
Big Problem with: No thread-bound request found Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Big Problem with: No thread-bound request found

    Hello,
    I have simple service

    Code:
    @Service //singleton
    public class SomeService{
    
    @Autowired
    UserContext userContext; //session scope
    
    public void someMethod(){
    userContext.getUserId();
    ......
    
    }
    }
    When I invoke this method from servlet(by user request) everything works fine but when I invoke this from JMS customer I got exception

    Code:
    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/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
    I'm understand this exception and I know why it dosen't work (no user request->no session context) but how to resolve this problem.....in JMS consumet I know which user put message to queue....

    Best regards
    Mirek
    Last edited by MirekSz; Jun 5th, 2011, 11:47 AM.
Working...
X