Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

spring roo and activemq

 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont understand the connection between roo and active mq. what benefits does it provide?

source http://www.manning.com/rimple/
 
author
Posts: 63
Mac OS X Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ActiveMQ connection is just a sample of a JMS configuration. When you do

roo> jms setup

Roo builds an ActiveMQ embedded container, and binds it to a connection factory for use by Spring JMS APIs.

Here it is from the applicationContext-jms.xml file:



It also creates a JMS Template (which you could inject anywhere in a service and then use to send messages or receive them synchronously:



If you want to deliver messages to specific beans, Roo can do that too. You can issue this command:

roo> jms listener class --class ~.baz.ListenerGuy --destination myQueue --destinationType QUEUE

and you'll get a queue listener, which allows Spring to deliver JMS messages to a POJO:



The listener is not a message driven EJB, it's just a Spring bean with a specific method:



Why ActiveMQ? Because it was available and open for anyone to set up.

If you want to use your own JMS setup, you can, just replace the amq: tags above with a <jee:jndi> tag to look up the Connection Factory, then inject it into cachingConnectionFactory, for example.

Unfortunately there is only one provider in the base roo configuration, ACTIVEMQ_IN_MEMORY. It would be nice to expand that list. (Patch suggestion...)

Ken
 
author
Posts: 5
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just want to add to Ken's response. ActiveMQ is becoming a popular JMS container in the open source messaging framework category. It's easy to unit test with, because of its support for embedded broker. It also has fine grained security control at different levels of JMS architecture (i.e. Broker, Connection and Message level). If you are interested in learning more about ActiveMQ, checkout their website or ActiveMQ in Action book from the same publishers as our book (Manning).

Thanks
Srini
    Bookmark Topic Watch Topic
  • New Topic