简体   繁体   English

如何在WebLogic 12c中使用远程JMS提供程序

[英]How to use remote JMS provider in WebLogic 12c

I'm reading this FAQ by Oracle about integrating with remote JMS provider. 我正在阅读Oracle的有关与远程JMS提供程序集成的FAQ By remote JMS provider I mean JMS server hosted by another WebLogic cluster in different domain. 远程JMS提供程序是指由不同域中的另一个WebLogic群集托管的JMS服务器。

The FAQ is old and doesn't go into much detail how to actually configure the remote JMS connection. 该FAQ很旧,并且没有详细介绍如何实际配置远程JMS连接。 Here is a take from the FAQ 这是常见问题解答

Q. What information do I need to set up communications with a remote JMS provider? 问:我需要什么信息来建立与远程JMS提供程序的通信?

A. You will need the following information to set up communications with a remote JMS provider: 答:您将需要以下信息来设置与远程JMS提供程序的通信:

The destination type—whether the remote JMS destination is a queue or a topic. 目标类型-远程JMS目标是队列还是主题。 The JNDI name of the remote JMS destination. 远程JMS目标的JNDI名称。 For durable topic subscribers—the connection-id and subscriber-id names that uniquely identify them. 对于持久主题订户-唯一标识它们的connection-id和subscriber-id名称。 Message Driven EJBs provide default values for these values based on the EJB name. 消息驱动的EJB根据EJB名称为这些值提供默认值。 For non-WebLogic remote JMS providers Initial Context Factory Class Name— the java class name of the remote JMS Provider's JNDI lookup service. 对于非WebLogic远程JMS提供程序,初始上下文工厂类名称-远程JMS提供程序的JNDI查找服务的Java类名称。 The file location of the java jars containing the remote JMS provider's JMS client and JNDI client libraries. 包含远程JMS提供程序的JMS客户端和JNDI客户端库的Java jar的文件位置。 Ensure that these jars are specified in the local JVM's classpath. 确保在本地JVM的类路径中指定了这些jar。 The URL of the remote provider's JNDI service. 远程提供者的JNDI服务的URL。 For WebLogic servers, the URL is normally in the form t3://hostaddress:port. 对于WebLogic服务器,URL通常采用t3:// hostaddress:port的形式。 If you are tunneling over HTTP, begin the URL with http rather than t3. 如果通过HTTP进行隧道传输,则以http而不是t3开头URL。 No URL is required for server application code that accesses a WebLogic JMS server that resides on the same WebLogic server or WebLogic cluster as the application. 访问与应用程序位于同一WebLogic服务器或WebLogic群集上的WebLogic JMS服务器的服务器应用程序代码不需要URL。 The JNDI name of the remote provider's JMS connection factory. 远程提供者的JMS连接工厂的JNDI名称。 This connection factory must exist on the remote provider, not the local provider. 此连接工厂必须存在于远程提供程序上,而不是本地提供程序上。 If the JMS application requires transactions, the connection factory must be XA capable. 如果JMS应用程序需要事务,则连接工厂必须具有XA功能。 WebLogic documentation refers to XA capable factories as user transactions enabled. WebLogic文档将启用XA的工厂称为启用了用户事务的工厂。

By default, WebLogic servers automatically provide three non-configurable connection factories: 默认情况下,WebLogic服务器自动提供三个不可配置的连接工厂:

weblogic.jms.ConnectionFactory—a non-XA capable factory. weblogic.jms.ConnectionFactory-不支持XA的工厂。 weblogic.jms.XAConnectionFactory—an XA-capable factory weblogic.jms.MessageDrivenBeanConnectionFactory—an XA-capable factory for message driven EJBs. weblogic.jms.XAConnectionFactory-具有XA功能的工厂weblogic.jms.MessageDrivenBeanConnectionFactory-具有XA功能的消息驱动EJB的工厂。 Additional WebLogic JMS connection factories must be explicitly configured. 必须明确配置其他WebLogic JMS连接工厂。

So the basic idea is to retrieve the JMS resources from the remote server's JNDI context and store them in the local JNDI context. 因此,基本思想是从远程服务器的JNDI上下文中检索JMS资源并将其存储在本地JNDI上下文中。

Doing the JNDI mapping seems old school to me. 对我来说,进行JNDI映射似乎很老。 What is the modern way to integrate with remote WebLogic 12c JMS provider in 2018? 在2018年与远程WebLogic 12c JMS提供程序集成的现代方式是什么? Or is the JNDI mapping still relevant, and where could I find more information about it? 还是JNDI映射仍然相关,在哪里可以找到更多有关它的信息?

There's 3 ways to connect to remote JMS server 1) using foreign JMS (ie JNDI mapping) 2) using Messaging bridge (adapter bit old school) 3) using SAF (store and forward) 有3种方法可以连接到远程JMS服务器:1)使用外部JMS(即JNDI映射)2)使用消息传递桥(适配器位老派)3)使用SAF(存储和转发)

If the connection with the remote JMS is reliable or availability of both the local and remote jms server is same then foreign JMS is a good and simple option. 如果与远程JMS的连接可靠,或者本地和远程jms服务器的可用性均相同,则外部JMS是一个很好且简单的选择。

If you can't depend on the availability of the remote JMS server, and want to consume message as soon as they arrive and let the local server process it in due course then SAF is recommended.. 如果您不能依靠远程JMS服务器的可用性,并且想在消息到达时立即使用它并让本地服务器在适当的时候对其进行处理,那么建议使用SAF。

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

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