简体   繁体   English

通过 Mule 4 连接到 WebLogic 上的 JMS 队列

[英]Connect to JMS queue on WebLogic through Mule 4

I'm trying to connect to a JMS queue on WebLogic through Mule 4, but I'm not able to find any information regarding the configuration.我正在尝试通过 Mule 4 连接到 WebLogic 上的 JMS 队列,但我无法找到有关配置的任何信息。 Is it possible to subscribe to WebLogic queue without having username and password?是否可以在没有用户名和密码的情况下订阅 WebLogic 队列? I have JNDI context URL only which is of t3 protocol.我只有 t3 协议的 JNDI 上下文 URL 。

Mule 4 has a JMS connector to connect to JMS message brokers. Mule 4 有一个JMS 连接器来连接到 JMS 消息代理。 First you need to know how to connect to WebLogic Queue using JMS, for example in a Java application.首先,您需要知道如何使用 JMS 连接到 WebLogic Queue,例如在 Java 应用程序中。 Once you understand that configuration, then translate it to using the JMS connector in Mule.一旦您了解了该配置,然后将其转换为在 Mule 中使用 JMS 连接器。 For example the connector allows the usage of JNDI connections.例如,连接器允许使用 JNDI 连接。 Remember to add the proper client libraries for Weblogic JMS to the Mule application project.请记住将 Weblogic JMS 的正确客户端库添加到 Mule 应用程序项目中。

If it is possible at all to connect without user and password will depend on what the Weblogic and your installation allows.是否可以在没有用户名和密码的情况下进行连接将取决于 Weblogic 和您的安装允许的内容。

I found this example configuration of the JMS connector for Weblogic.我找到了 Weblogic 的 JMS 连接器的示例配置。 You may need a different configuration for your installation.您的安装可能需要不同的配置。

Example:例子:

<jms:config name="JMS_Config_Weblogic" doc:name="JMS Config"  >
    <jms:generic-connection username="myuser" password="mypassword">
        <jms:connection-factory >
           <jms:jndi-connection-factory connectionFactoryJndiName="jms/somejndiname" >
              <jms:custom-jndi-name-resolver >
                  <jms:cached-jndi-name-resolver jndiInitialFactory="weblogic.jndi.WLInitialContextFactory" jndiProviderUrl="t3://myhost.com:8830" >
                  </jms:cached-jndi-name-resolver>
              </jms:custom-jndi-name-resolver>
           </jms:jndi-connection-factory>
       </jms:connection-factory>
    </jms:generic-connection>
</jms:config>

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

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