Announcement Announcement Module
Collapse
No announcement yet.
Request scope for JMS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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,
    Harald

  • #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.

    [1] http://static.springsource.org/sprin...y-scopes-other

    Best regards
    Pontus Ullgren

    Comment

    Working...
    X