1 Reply Latest reply on Jul 16, 2003 10:34 AM by Adrian Brock

    MDB Reply

    ylebar Newbie

      I have the a Session Bean sending a message to a MDB on another server. This MDB replies to the session bean (I have 2 queues: requestAAA and responseAAA) .
      The question is: how do I make sure the session bean reads the right message ?

      I tried the following:
      - SB1 sends a message
      - MDB gets the message and replies to it
      - SB1 waits
      - SB2 sends a new message
      - MDB gets the new message and replies to it
      - SB2 gets the message
      - SB1 gets the message

      And the result was that SB2 was receiving the first answer ...

        • 1. Re: MDB Reply
          Adrian Brock Master

          Add a property and get the session bean to use a selector.
          Or use different queues for the replies.

          I can never understand why people do this kind
          of processing what is wrong with invoking a session
          bean on server2? You obviously don't need it to
          run in the same transaction (it wouldn't work if you did)
          so you don't need a DTM.

          SB1 (server1) -> SBx (server2)

          If you need to make it available through JMS as well,
          you just do:
          MDB (server2) -> SBx (server2)