Weblogic EJB连接到外部Tibco EMS JMS队列 [英] Weblogic EJB connection to external Tibco EMS JMS Queue
问题描述
我正在尝试将Weblogic(10.3)MDB连接到Tibco EMS JMS队列。我使用简单的Java / Spring JNDI连接从队列中读取,所以我知道外部的JNDI查找名称是有效的。
我的WL外部服务器详细信息:
JNDI初始上下文工厂:com.tibco.tibjms.naming.TibjmsInitialContextFactory
JNDI连接URL:tcp://ems-dit-am-uat-1.app.xxx.net:30055
JNDI属性:
java.naming.factory.initial = com.tibco。 tibjms.naming.TibjmsInitialContextFactory
java.naming.provider.url = tcp://ems-dit-am-uat-1.app.xxx.net:30055
java.naming.security.principal = rdsuat
java.naming.factory.url.pkgs = com.tibco.tibjms.naming
(在属性凭据框中输入密码)。
目的地:
code>名称,本地JNDI名称和远程JNDI名称全部设置为Q.NY.DERIV.DRD.RFI
连接工厂:
名称,本地JNDI名称和远程JNDI名称都设置为DRDRFIQueueConnectionFactory
这只是改变默认连接工厂端口)。
用户/密码也在这里设置(与之前一样)。
weblogic-ejb-jar.xml
< weblogic-enterprise-bean>
< ejb-name> MessageReceiver< / ejb-name>
< message-driven-descriptor>
< pool>
< max-beans-in-free-pool> 2< / max-beans-in-free-pool>
< / pool>
< destination-jndi-name> Q.NY.DERIV.DRD.RFI< / destination-jndi-name>
< connection-factory-jndi-name> DRDRFIQueueConnectionFactory< / connection-factory-jndi-name>
< / message-driven-descriptor>
< / weblogic-enterprise-bean>
我得到的错误是:
消息驱动的EJB:MessageReceiver无法连接到JMS目的地:Q.NY.DERIV.DRD.RFI。错误是:
无法获取分发目的地信息。目标JNDI名称为Q.NY.DERIV.DRD.RFI,提供程序URL为null
我尝试将配置移动到weblogic-ejb-jar中。 xml(即:
< weblogic-enterprise-bean>
< ejb-name> MessageReceiver< / ejb -name>
< message-driven-descriptor>
< pool>
< max-beans-in-free-pool> 2< / max-beans-in-free-池>
< / pool>
< destination-jndi-name> Q.NY.DERIV.DRD.RFI< / destination-jndi-name>
< initial-context-工厂> com.tibco.tibjms.naming.TibjmsInitialContextFactory< / initial-context-factory>
< provider-url> tcp://ems-dit-am-uat-1.app.xxx.net:30055< ; / provider-url>
< connection-factory-jndi-name> DRDRFIQueueConnectionFactory< / connection-factory-jndi-name>
< / message-driven-descriptor>
< / weblogic-enterprise-bean>
但我得到一个不同的错误:
异常激活模块:EJBModule(rfiloader.jar)无法从rfiloader.jar部署EJB:MessageReceiver:无法找到tcp的EndPointFinder:// ems-dit-am-uat -1.app.xxx.net:30055
...任何想法?
感谢
Chris
终于实现了这一点 - 由于Weblogic 10.3中的一个错误,这不是那么简单。
-
创建具有所有正常详细信息(目标和连接工厂的本地/远程JNDI查找名称)的外部服务器。 p>
-
创建与远程EMS用户名相同的本地WL用户,包括密码。
- p>创建ejb凭据映射(NOT安全凭证映射)
- 通过单击相关部署,单击相关的ejb名称在列表中,然后安全选项卡然后凭据映射选项卡。
- 添加相同的名称fo r WLS和远程用户(这里似乎不需要密码)。
在配置文件中添加以下部分:
weblogic-ejb-jar.xml
在此文件的底部,关闭weblogic-enterprise-bean标签之后,在结尾的weblogic-ejb-jar标签之前添加以下内容:
<安全角色的分配>
< role-name> rficonsumer< / role-name>
< principal-name> rdsuat< / principal-name>
< / security-role-assignment>
'rficonsumer'角色只存在于这2个配置文件中,只要是在这里描述的所有3个部分一致。
主体名称rdsuat必须与WL管理控制台部分中创建的用户相匹配,因此必须与EMS队列用户匹配。
ejb-jar.xml
-
在消息驱动相关MDB在结束消息驱动标签之前的最后添加以下部分:
rficonsumer
-
在文件末尾关闭'enterprise-beans'标签后,在结束'ejb-jar'结束标签之前添加以下:
rficonsumer
I'm trying to connect a Weblogic (10.3) MDB to a Tibco EMS JMS queue. I've read from the queue using a simple Java/Spring JNDI connection so I know the foreign JNDI lookup names are valid. My WL foreign server details:
JNDI Initial Context Factory: com.tibco.tibjms.naming.TibjmsInitialContextFactory
JNDI Connection URL: tcp://ems-dit-am-uat-1.app.xxx.net:30055
JNDI Properties:
java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
java.naming.provider.url=tcp://ems-dit-am-uat-1.app.xxx.net:30055
java.naming.security.principal=rdsuat
java.naming.factory.url.pkgs=com.tibco.tibjms.naming
(password entered in Properties Credential box).
Destination:
Name, Local JNDI Name and Remote JNDI name all set to Q.NY.DERIV.DRD.RFI
Connection Factory:
Name, Local JNDI Name and Remote JNDI name all set to DRDRFIQueueConnectionFactory
(which simply changes the default connection factory port).
User/password also set here (same as before).
weblogic-ejb-jar.xml
<weblogic-enterprise-bean>
<ejb-name>MessageReceiver</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>2</max-beans-in-free-pool>
</pool>
<destination-jndi-name>Q.NY.DERIV.DRD.RFI</destination-jndi-name>
<connection-factory-jndi-name>DRDRFIQueueConnectionFactory</connection-factory-jndi-name>
</message-driven-descriptor>
</weblogic-enterprise-bean>
The error I get is: The Message-Driven EJB: MessageReceiver is unable to connect to the JMS destination: Q.NY.DERIV.DRD.RFI. The Error was: Can not get distribute destination information. The destination JNDI name is Q.NY.DERIV.DRD.RFI, the provider URL is null
I've tried moving the config into the weblogic-ejb-jar.xml (ie:
<weblogic-enterprise-bean>
<ejb-name>MessageReceiver</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>2</max-beans-in-free-pool>
</pool>
<destination-jndi-name>Q.NY.DERIV.DRD.RFI</destination-jndi-name>
<initial-context-factory>com.tibco.tibjms.naming.TibjmsInitialContextFactory</initial-context-factory>
<provider-url>tcp://ems-dit-am-uat-1.app.xxx.net:30055</provider-url>
<connection-factory-jndi-name>DRDRFIQueueConnectionFactory</connection-factory-jndi-name>
</message-driven-descriptor>
</weblogic-enterprise-bean>
but I get a different error: Exception activating module: EJBModule(rfiloader.jar) Unable to deploy EJB: MessageReceiver from rfiloader.jar: unable to find EndPointFinder for tcp://ems-dit-am-uat-1.app.xxx.net:30055
...any ideas?
Thanks Chris
Have finally achieved this - due to a bug in Weblogic 10.3 this isn't as simple as it should be.
Create a foreign server with all the normal details (local/remote JNDI lookup names for destination and connection factories).
Create a local WL user with the same name as the remote EMS user, including password.
Create an ejb credential mapping (NOT security credential mapping)
- do this by clicking on the relevant deployment, click on the relevant ejb name in the list, then Security tab then Credentials Mapping tab.
- add the same name for WLS and Remote users (password doesn't seem to be necessary here).
Add the following sections in config files:
weblogic-ejb-jar.xml
At the bottom of this file, after the closing 'weblogic-enterprise-bean' tag and before the ending 'weblogic-ejb-jar' tag add the following:
<security-role-assignment>
<role-name>rficonsumer</role-name>
<principal-name>rdsuat</principal-name>
</security-role-assignment>
The 'rficonsumer' role only exists in these 2 config files and can be anything as long as it is consistent in all 3 sections described here. The principal-name 'rdsuat' must match the user created in the WL Admin console section and therefore must match the EMS queue user.
ejb-jar.xml
In the 'message-driven' tag section for the relevant MDB add the following section at the end before the closing 'message-driven' tag:
rficonsumer
At the very end of the file, after the closing 'enterprise-beans' tag, before the ending 'ejb-jar' closing tag add the following:
rficonsumer
这篇关于Weblogic EJB连接到外部Tibco EMS JMS队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!