Announcement Announcement Module
No announcement yet.
Request scope for JMS Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Request scope for JMS

    I have a web application which also uses JMS via Camel and Lingo.

    How can I ensure that request scoped beans are also available to threads handling JMS messages?

    Best regards,

  • #2
    The request scope is only available in web-aware Spring ApplicationContext implementation [1].
    So you will probably not be able to get a request scoped bean in the thread that consumes the message.

    Depending on your needs I would consider to marshal the bean, or some portion of it, and send that information in the message. That way the message consumer can act on the information and possibly instantiate it own beans.


    Best regards
    Pontus Ullgren