Class MessageServlet

  • All Implemented Interfaces:
    Serializable, Servlet, ServletConfig

    public class MessageServlet
    extends MessageServletSupport
    A servlet for sending and receiving messages to/from JMS destinations using HTTP POST for sending and HTTP GET for receiving.

    You can specify the destination and whether it is a topic or queue via configuration details on the servlet or as request parameters.

    For reading messages you can specify a readTimeout parameter to determine how long the servlet should block for. One thing to keep in mind with this solution - due to the nature of REST, there will always be a chance of losing messages. Consider what happens when a message is retrieved from the broker but the web call is interrupted before the client receives the message in the response - the message is lost.

    See Also:
    Serialized Form