Class JmsRequestDispatcher

All Implemented Interfaces:

public class JmsRequestDispatcher extends Object implements RequestDispatcher
This RequestDispatcher dispatches Requests via JMS. It uses the Spring Framework, because they have already done much of the work needed to use JMS. Please note that you don't actually have to use the Spring Framework in order to use this class, as long as the necessary Spring libraries are available. See the pom.xml of RRiBbit for the libraries that you need.

Dispatching Requests to the JmsRequestDispatcher will always yield an empty Response, because JMS is a one-way protocol. No response will ever come back. The Responses returned by the JmsRequestDispatcher therefore have an empty list with return values and an empty list with throwables. No null values are returned however, so that the caller does not have to take that into account.

For more information, see this page.

G.J. Schouten
  • Constructor Details

    • JmsRequestDispatcher

      public JmsRequestDispatcher()
      Whenever you use this constructor, be sure to set the Queue AND the ConnectionFactory with the setters provided by this class. If you don't, runtime exceptions will occur.
    • JmsRequestDispatcher

      public JmsRequestDispatcher(jakarta.jms.ConnectionFactory connectionFactory, jakarta.jms.Queue queue)
      Creates a new JmsRequestDispatcher that dispatches Messages to the given Queue, using the given ConnectionFactory. This constructor is recommended, since it forces you to specify the Queue and ConnectionFactory. Passing a null value for either of these will result in runtime exceptions whenever the JmsRequestDispatcher is used.
      connectionFactory -
      queue -
  • Method Details