从IBM MQ迁移到javax.jms.*(Weblogic) [英] Migrating from IBM MQ to javax.jms.* (Weblogic)

查看:164
本文介绍了从IBM MQ迁移到javax.jms.*(Weblogic)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找有关如何从使用IBM Websphere MQ迁移到仅使用Weblogic 10.3.x服务器中的QueueManager进行迁移的日子.这将节省IBM MQ的许可证成本.我最接近的是找到一个外部链接,该链接指出存在一些类似的IBM示例(从MQ移到标准jms库),但是当我尝试跟随该链接时:

I've been looking for days about how one could migrate from using IBM Websphere MQ to rather only using the QueueManager within Weblogic 10.3.x server. This would save cost of licenses for IBM MQ. The closest I came was finiding an external link which stated that IBM examples existed that did something similar(moving away from MQ to standard jms libraries), but when I attempted to follow the link: http://www.developer.ibm.com/isv/tech/sampmq.html it lead to a dead page :\

更具体地说,我对此感兴趣

More specifically I am interested in

  1. 在尝试替换以下com.ibm.mq. *类时要使用的类:
    • MQEnvironment
    • MQQueueManager
    • MQGetMessageOptions
    • MQPutMessageOptions
    • 和其他没有明显的javax.jms.*替代方法的类.
  1. What classes to use in my attempts to replace the following, com.ibm.mq.* classes:
    • MQEnvironment
    • MQQueueManager
    • MQGetMessageOptions
    • MQPutMessageOptions
    • and other classes which don't have an obvious javax.jms.* alternative.

如果发生任何变化,我们将队列消息转发到的数据库是Oracle 11 Standard(具有高级队列),因此,基本上,我们正在寻找砍掉中间人"的说法.您学到的答案将不胜感激!

The database we are forwarding the queue messages to is Oracle 11 Standard (with advanced queuing) if that changes anything, so basically we are looking to "cut out the middle-man", so to speak. Your learned responses will be highly appreciated!

推荐答案

我已经完成了一个同时支持JBossMQ和MQSeries/WebSphere MQ的应用程序.

I have completed an application which supported both JBossMQ and MQSeries/WebSphere MQ.

我需要的MQSeries特定类是

The MQSeries specific classes I required were

import com.ibm.mq.jms.JMSC;
import com.ibm.mq.jms.MQConnectionFactory;
import com.ibm.mq.jms.MQQueueConnectionFactory;
import com.ibm.mq.jms.MQTopicConnectionFactory;

这些足以创建javax.jms.QueueConnection/TopicConnection.

对于WebSphere MQ,我直接连接. 至于JBossMQ,我使用JNDI查找了工厂.

As for WebSphere MQ, I connected directly. As for JBossMQ I looked up the factories using JNDI.

因此,只有JMS.

  1. 所以第一步是重写您的应用程序,以便仅 初始化部分使用特定于WebSphere MQ的类(我在上面列出的类)

  1. So the first step is to rewrite your application so that only the initializing part uses WebSphere MQ specific classes (the ones I have listed above)

用JNDI/目录查找替换剩余的MQ特定部分,以查找应用服务器提供的queue connection factory

Replace the remaining MQ specific part with a JNDI/directory lookup for a queue connection factory provided by your application server

从源代码中删除MQ系列特定部分.

Remove the MQ series specific parts from your source.

这是一个简单的示例,其中显示了如何发送消息.

Here is a simple example which shows how to send a message.

这篇关于从IBM MQ迁移到javax.jms.*(Weblogic)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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