Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HornetQ on Tomcat

Is that possible to run HornetQ (JBoss JMS implementation) on Tomcat?

The HornetQ documentation is all about JBoss AS or standalone scenarios...

Update:
This is from HornetQ feature list: "HornetQ is architected as a set of Plain Old Java Objects, it can therefore be run in JBoss Microcontainer, Spring, Google Guice or embedded in any third party product and instantiated directly".

So I would be glad to to know how the Web Application (WAR) running on plain Tomcat can embed HornetQ?

like image 402
Gennady Shumakher Avatar asked Apr 26 '10 12:04

Gennady Shumakher


2 Answers

Tomcat is the same as standalone, you just have Tomcat running in a JVM and all you need to do is put the proper classes in the classpath.

Everything here is in the manual

1) You need to have a HornetMQ server running.
2) Put the jar files in the Tomcat classpath. 3) Put the proper Queue Connection factories and Queue Connections into your JNDI provider.

You are now ready to run...

1) Get QCF and Q properties from JNDI. 2) Access in Servlet.

like image 123
Romain Hippeau Avatar answered Nov 01 '22 17:11

Romain Hippeau


To Rajiv HornetQ can be integrated with Tomcat JNDI and can be used from from spring beans. Description here http://wash-inside-out.blogspot.com/2010/08/hornetq-jms-integration-with-tomcat.html

like image 39
Igor Avatar answered Nov 01 '22 15:11

Igor