RRiBbit Remoting over JMS

This chapter will explain how to set up Remoting over JMS. As opposed to Remoting over RMI, using JMS will actually preserve your transactional context. SSL and other infrastructure related things on the other hand, are not taken care of by RRiBbit. The reason for this is that JMS is a complex system, and different users will probably want to set it up in different ways. Therefore, RRiBbit just hooks in to the interfaces provided by JMS, without actually setting up the JMS infrastructure. This means that you have to have some knowledge of setting up a JMS infrastructure before you can use RRiBbit JMS Remoting.

RRiBbit uses Spring JMS internally to send requests to a Queue, so you have to have the spring-jms.jar file on your classpath. You don't actually have to use Spring yourself though, as RRiBbit only uses jakarta.jms interfaces to communicate with the rest of the application.

Server side

On the server side, RRiBbit provides the JmsRequestProcessor, which is an extension of LocalRequestProcessor. This means that you can give it references to a ListenerObjectRetriever and a ListenerObjectExecutor. The JmsRequestProcessor implements the jakarta.jms.MessageListener interface, so after you've created your instance of JmsRequestProcessor, you can hook it up to your JMS infrastructure and it will listen to Messages that are sent to it.

Client side

Those messages are actually generated by the JmsRequestDispatcher. It implements the RequestDispatcher interface, so you can pass it directly to the RequestResponseBus. You will have to specify the jakarta.jms.ConnectionFactory and the jakarta.jms.Queue that will be used to send the Messages to the server side.

That's all there is to know about RRiBbit Remoting over JMS! As previously said, RRiBbit JMS Remoting does not provide as much functionality as RRiBbit RMI Remoting does. It does not set up the infrastructure and it does not care of SSL, failover or loadbalancing. JMS is just too versatile and complex for that and each application will want to do these things in their own way. For other RRiBbit Remoting implementations, please see this page. And before you actually start using RRiBbit, make sure that you check the FAQ!