This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

spring roo and activemq

 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic