0

从控制台启动侦听器时出现以下错误。00000086 MDBListenerIm W WMSG0019E: 无法启动 MDB 侦听器

SolaceJMSMessage1**,JMSDestination testqueue:com.ibm.websphere.naming.CannotInstantiateObjectException:JNDI NamingManager 处理 javax.naming.Reference 对象时发生异常。[Root **exception is javax.naming.NamingException: JNDI lookup failed - JNDI name must**** have a minimum length of 1]

ejb-jar.xml:

<message-driven id="MessageDriven_jgbmdb_1074133220117">
            <ejb-name>SolaceJMSMessage1</ejb-name>
            <ejb-class>com.package.solace.SolaceJMSMessageMDB</ejb-class>
            <transaction-type>Bean</transaction-type>
            <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
            <message-driven-destination>
               <destination-type>javax.jms.Queue</destination-type>
            </message-driven-destination>
        </message-driven>

ibm-ejb-jar-bnd.xmi:

<ejbBindings xmi:type="ejbbnd:MessageDrivenBeanBinding" xmi:id="MessageDrivenBeanBinding_jgwmdb_1074133220117" listenerInputPortName="testqueueListenerPort">
    <enterpriseBean xmi:type="ejb:MessageDriven" href="META-INF/ejb-jar.xml#MessageDriven_jgbmdb_1074133220117"/>
  </ejbBindings> 

我错过了上述配置中的任何内容吗?

4

3 回答 3

1

您可能会发现本指南很有用:

http://www.solacesystems.com/wp-content/uploads/resources/Solace-JMS-Integration-with-WAS-V7-and-V8.pdf

这概述了如何在 WAS 中有效地使用 Solace JMS API,并给出了 ejb-jar.xml 和 ibm-ejb-jar-bnd.xml 的示例

于 2015-07-23T13:18:04.853 回答
0

我猜从 WAS 7 开始就没有使用监听器端口。尝试将其绑定到激活规范。以下配置适用于 WAS7 及更高版本 (EJB3)。

@MessageDriven(
    mappedName = "jms/myInQueue", activationConfig = {
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })
@TransactionManagement(TransactionManagementType.BEAN)
public class BatchUpdateMDB implements MessageListener { }

ejb-jar.xml 为空,在 ibm-ejb.jar-bnd.xml 中:

<message-driven name="BatchUpdateMDB">
    <jca-adapter activation-spec-binding-name="jms/myQueueInActSpec" destination-binding-name="jms/myInQueue"/>
</message-driven>
于 2015-06-23T14:55:11.463 回答
-1

管理控制台中的应用程序 > 应用程序类型 > WebSphere 企业应用程序 > application_name > EJB JNDI 名称。

于 2015-06-15T14:31:50.027 回答