Tomcat上的HornetQ [英] HornetQ on Tomcat

查看:115
本文介绍了Tomcat上的HornetQ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Tomcat上运行HornetQ(JBoss JMS实现)?

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

HornetQ文档全部涉及JBoss AS或独立方案...

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

更新:
这来自HornetQ功能列表:"HornetQ被设计为一组普通的旧Java对象,因此可以在JBoss Microcontainer,Spring,Google Guice中运行,也可以嵌入任何第三方产品中并直接实例化".

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".

因此,我很高兴知道纯Tomcat上运行的Web应用程序(WAR)如何嵌入HornetQ?

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

推荐答案

Tomcat与独立版本相同,只是让Tomcat在JVM中运行,而您要做的就是将适当的类放在类路径中.

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.

这里的所有内容都在手册

1)您需要运行HornetMQ服务器.
2)将jar文件放在Tomcat类路径中. 3)将适当的队列连接工厂和队列连接放入您的JNDI提供程序中.

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)从JNDI获取QCF和Q属性. 2)在Servlet中访问.

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

这篇关于Tomcat上的HornetQ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆