0

我的 j2EE 应用程序当前正在ServiceMix上运行。现在我想将 JMS 添加到我的应用程序中。应用程序应该能够向/从保留在MQSeries上的队列发送/接收 JMS 消息。

mq.hostname=10.3.6.19
mq.channel=CHANNEL
mq.queueManager=QManager
mq.port=1422

我想做的是:

 1. Create a jndi.xml file and do configuration for jms stuff.
 2. my app will initialize the context, look up jndi name, and create a connection, queueManager, queue. .etc
 3. Develop send and receive methods.

我的问题是:你能告诉我如何做第一步和第二步吗?(ServiceMix 的 jndi 中的脚本与 tomcat 的 jndi 等不同。ServiceMix 使用基于 Spring 的 JNDI 提供程序 。http://servicemix.apache.org/jndi-configuration.html

4

1 回答 1

1

我刚刚遇到了与 Weblogic 类似的东西。以下链接使用 spring-dm 与 websphere 集成。它还将它带到下一个合乎逻辑的步骤,并将骆驼添加到组合中。 http://lowry-techie.blogspot.com/2010/11/camel-integration-with-websphere-mq.html

如果不使用 Spring-dm,您可能会在尝试从 websphere jar 加载 InitialContextFactory 时遇到类加载器问题(这是我在使用 Weblogic jar 时遇到的问题)

于 2011-08-12T18:48:44.100 回答