Results 1 to 2 of 2

Thread: Request scope for JMS

  1. #1

    Default 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. #2
    Join Date
    Jun 2011
    Posts
    35

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •