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

How to use remote JMS provider in WebLogic 12c

我正在阅读 this FAQ by Oracle 关于与远程 JMS 提供程序集成的内容。我所说的远程 JMS 提供程序是指由不同域中的另一个 WebLogic 集群托管的 JMS 服务器。

FAQ 很旧,没有详细介绍如何实际配置远程 JMS 连接。以下是常见问题解答

Q. What information do I need to set up communications with a remote JMS provider?

A. You will need the following information to set up communications with a remote JMS provider:

The destination type—whether the remote JMS destination is a queue or a topic. The JNDI name of the remote JMS destination. For durable topic subscribers—the connection-id and subscriber-id names that uniquely identify them. Message Driven EJBs provide default values for these values based on the EJB name. For non-WebLogic remote JMS providers Initial Context Factory Class Name— the java class name of the remote JMS Provider's JNDI lookup service. The file location of the java jars containing the remote JMS provider's JMS client and JNDI client libraries. Ensure that these jars are specified in the local JVM's classpath. The URL of the remote provider's JNDI service. For WebLogic servers, the URL is normally in the form t3://hostaddress:port. If you are tunneling over HTTP, begin the URL with http rather than t3. 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. The JNDI name of the remote provider's JMS connection factory. 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. WebLogic documentation refers to XA capable factories as user transactions enabled.

By default, WebLogic servers automatically provide three non-configurable connection factories:

weblogic.jms.ConnectionFactory—a non-XA capable factory. weblogic.jms.XAConnectionFactory—an XA-capable factory weblogic.jms.MessageDrivenBeanConnectionFactory—an XA-capable factory for message driven EJBs. Additional WebLogic JMS connection factories must be explicitly configured.

所以基本思路是从远程服务器的 JNDI 上下文中检索 JMS 资源,并将它们存储在本地 JNDI 上下文中。

做 JNDI 映射对我来说似乎很老套。 2018 年与远程 WebLogic 12c JMS 提供程序集成的现代方式是什么?或者 JNDI 映射是否仍然相关,我在哪里可以找到有关它的更多信息?

有3种方式连接到远程JMS服务器 1)使用国外JMS(即JNDI映射) 2) 使用 Messaging bridge (adapter bit old school) 3) 使用 SAF(存储转发)

如果与远程 JMS 的连接可靠或本地和远程 jms 服务器的可用性相同,那么外部 JMS 是一个不错且简单的选择。

如果您不能依赖远程 JMS 服务器的可用性,并且希望在消息到达后立即使用它们并让本地服务器在适当的时候处理它,那么建议使用 SAF。.