在 serviceMix 中配置 jndi.xml 以与 MQseries 一起使用
我的 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)
My j2EE app is currently running on ServiceMix. Now i want to add JMS to my app. The application should able to send/receive the JMS message to/from the queue that stays on MQSeries.
mq.hostname=10.3.6.19
mq.channel=CHANNEL
mq.queueManager=QManager
mq.port=1422
What i would like to do is:
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.
My question is:
Can you tell me how to do 1st and 2nd steps.
(the script inside ServiceMix's jndi is diffrent with tomcat's
jndi and others.
ServiceMix using Spring based JNDI provider.
http://servicemix.apache.org/jndi-configuration.html)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚遇到了与 Weblogic 类似的情况。以下链接使用 spring-dm 与 websphere 集成。它还将其带到下一个逻辑步骤,并将骆驼添加到混合中。
http://lowry-techie.blogspot.com /2010/11/camel-integration-with-websphere-mq.html
如果不使用 Spring-dm,您在尝试从以下位置加载 InitialContextFactory 时可能会遇到类加载器问题: websphere jar(这是我使用 Weblogic jar 时遇到的问题)
I just ran into something similar with Weblogic. The following link uses spring-dm to integrate with websphere. It also takes it to the next logical step and adds camel to the mix.
http://lowry-techie.blogspot.com/2010/11/camel-integration-with-websphere-mq.html
Without using Spring-dm, you may run into classloader issues when trying to load the InitialContextFactory from the websphere jar (this is an issue I had with the Weblogic jar)