Without entering in to too many details what we are going to do is basically create a simple Spring Console application that will produce and consume the usual ECG message on the usual ECGQueue
queue. To do this we need to follow these steps:
Create a Spring project, which is the easy task.
Create an interface for our Bean, where we will define the only method that will be called.
Create an implementation class for the Bean interface, where we will create and consume the JMS message.
Create a definition file that will map the method on the Bean implementation to an XML definition.
Create a method interceptor to correctly invoke the Bean.
Finally we will create a tester class that will be used to display the results.
So let us start with the project creation.
From the IDE go to File | Menu | Spring Project and name it SpringHornetqExample
. You should have the following IDE perspective:
Now we need some Spring JAR files and the usual HornetQ JAR files. The Spring JAR files to be...