无法启动MDB列表器

时间:2015-06-15 13:03:27

标签: java queue jms websphere solace

从控制台启动侦听器时,我遇到错误。 00000086 MDBListenerIm W WMSG0019E:无法启动MDB侦听器

  

SolaceJMSMessage1 **,JMSDestination testqueue:   com.ibm.websphere.naming.CannotInstantiateObjectException:Exception   在JNDI NamingManager处理a时发生   javax.naming.Reference对象。 [Root **例外是   javax.naming.NamingException:JNDI查找失败 - JNDI名称必须****   最小长度为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> 

我是否错过了以上配置中的任何内容?

3 个答案:

答案 0 :(得分: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的示例

答案 1 :(得分: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>

答案 2 :(得分:-1)

Applications > Application Types > WebSphere enterprise applications > application_name > EJB JNDI names in the administrative console.