简体   繁体   English

WAS 6和JBOSS EAP 6.1之间的JMS通信

[英]JMS communication between WAS 6 and JBOSS EAP 6.1

I have an application deployed in Websphere which should push a message in a queue implemented in JBoss using HornetQ. 我在Websphere中部署了一个应用程序,该应用程序应使用HornetQ在JBoss中实现的队列中推送消息。 That message will then be consumed by an MDB within another application (on JBoss). 然后,该消息将被另一个应用程序(在JBoss上)中的MDB使用。 Is that even possible? 那有可能吗?

In summary: WAS (producer) -> JBoss (consumer) 总结:WAS(生产者)-> JBoss(消费者)

I think yes because the protocol JMS is shared, but what are the details? 我认为是的,因为协议JMS是共享的,但是详细信息是什么? should I load JBoss with MQ libraries or is it all in the way I refer to the JBoss queue from WAS? 应该使用MQ库加载JBoss还是使用WAS引用JBoss队列的全部方式? Thank you so much. 非常感谢。

If the MDB deployed on JBoss EAP is receiving a message from a local queue in HornetQ, then you do not need to deploy any MQ jars. 如果部署在JBoss EAP上的MDB正在从HornetQ中的本地队列接收消息,那么您不需要部署任何MQ jar。

All you will need to do is write a MDB application and read the messages in your onMessage(Message msg) method. 您所需要做的就是编写一个MDB应用程序,并在onMessage(Message msg)方法中读取消息。 It should be really as simple as that. 它真的应该是如此简单。

You can see an example of a MDB in the jboss eap quick start . 您可以在jboss eap 快速入门中看到MDB的示例。 The HelloWorldQueueMDB.java class is the one you might be interested in. Follow the code in that class and modify the destination annotation value for your particular HornetQ queue name (from standalone-full.xml or standalone-full-ha.xml or the full or full-ha profile in your domain.xml file). HelloWorldQueueMDB.java类是您可能感兴趣的类。请遵循该类中的代码,并为您的特定HornetQ队列名称修改目标注释值(从standalone-full.xmlstandalone-full-ha.xmlfull或您domain.xml文件中的full-ha档案)。

On a side note, JBoss EAP 6.1 is quite old. 附带说明一下,JBoss EAP 6.1已经很老了。 I would highly recommend upgrading to JBoss EAP 6.4.13 or later. 我强烈建议升级到JBoss EAP 6.4.13或更高版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM