Sending and receiving JMS messages
Spring Roo provides support for developing messaging applications based on JMS (Java Message Service) API. As of Spring Roo 1.1.5, the only JMS provider supported by Roo is embedded ActiveMQ
(http://activemq.apache.org/); it is configured in the same JVM as the Java application accessing it.
In this recipe, we'll look at how Spring Roo supports sending and receiving JMS messages using embedded ActiveMQ.
Getting ready
Create a sub-directory ch06-jms
inside the C:\roo-cookbook
directory.
Copy the ch06_web_app.roo
script into the ch06-jms
directory.
Execute the ch06_web_app.roo
script that creates flightapp-web
Roo project, sets up Hibernate as persistence provider, configures MySQL as the database for the application, creates Flight
and FlightDescription
JPA entities, and defines many-to-one relationship between Flight
and FlightDescription
entities. Also, script makes use of controller
all
command to scaffold a Spring Web MVC application from JPA entities. If...