0
votes

I am getting below error while starting listener from console. 00000086 MDBListenerIm W WMSG0019E: Unable to start MDB Listener

SolaceJMSMessage1**, JMSDestination testqueue : com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [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> 

Does I miss anything in above configuration?

3
Which Websphere Application Server are you using? I think with annotation since at least websphere 6.1+ you can avoid to configure the ejb-jar.xml, you only need the ibm-ejb-jar-bnd.xmialessiop86

3 Answers

1
votes

You may find this guide useful:

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

This outlines how to efficiently use the Solace JMS API within WAS and gives examples of ejb-jar.xml and ibm-ejb-jar-bnd.xml

0
votes

I guess listener ports are not used since WAS 7. Try to bind it to activation specification instead. The following configuration works on WAS7 onwards (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 empty and in ibm-ejb.jar-bnd.xml:

<message-driven name="BatchUpdateMDB">
    <jca-adapter activation-spec-binding-name="jms/myQueueInActSpec" destination-binding-name="jms/myInQueue"/>
</message-driven>
-1
votes

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