0

I'm trying to get an MDB Listener working in Websphere Liberty v16.0.0.4 but I don't get a message in my messages.log that the application that needs to use the MDB Listener has been bound to the activation spec.

I have the following information:

QueueManager: TEST  
Hostname: localhost  
Default ServerConnectionChannel: BAN.TEST.T1   
Portnumber: 5704

Queue Connection Factory:  
JndiName: jms/dbd_pega_CNVBANQCF  
Type TCF/QCF/CF: QCF  
ServerConnectionChannel: BAN.TEST.T1  

Queue 1:  
JndiName: jms/dbd_pega_CNVBAN_ReqQ  
queueName: SRV00026.201206.BAN  

Queue 2:  
JndiName: jms/dbd_pega_CNVBAN_RplQ  
queueName: BAN.RPL.BAN   

Activation Specification:  
JNDI Activation Specification: eis/dbd_pega_cnvbanQAS  
Name Activation Specification: dbd_pega_cnvbanQAS  
The JNDI name of the Destination Queue: jms/dbd_pega_CNVBAN_ReqQ

The MDB Listener is called CnvMQIbanServices.jar and is put in the ear file called prpc_j2ee14_ws.ear.

And this is my server.xml:

<xml version="1.0" encoding="UTF-8">
<server description="server">
<featureManager>
<feature>webProfile-7.0</feature>
<feature>localConnector-1.0</feature>
<feature>jdbc-4.1</feature>
<feature>ssl-1.0</feature>
<feature>servlet-3.1</feature>
<feature>ejb-3.2</feature>
<feature>ejbLite-3.2</feature>
<feature>ejbRemote-3.2</feature>
<feature>jndi-1.0</feature>
<feature>jms-2.0</feature>
<feature>jaxws-2.2</feature>
<feature>jaxb-2.2</feature>
<feature>restConnector-2.0</feature>
<feature>wmqJmsClient-2.0</feature>
<feature>jmsMdb-3.2</feature>
</featureManager>
<applicationManager autoExpand="true"/>
<jmsQueueConnectionFactory jndiName="jms/dbd_pega_CNVBANQCF" connectionManagerRef="ConMgr6">
<properties.wmqJms
transportType="CLIENT"
hostName="localhost"
port="5704"
channel="BAN.TEST.T1"
queueManager="TEST"/>
</jmsQueueConnectionFactory>
<connectionManager id="ConMgr6" maxPoolSize="2"/>
<jmsQueue id="jms/dbd_pega_CNVBAN_ReqQ" jndiName="jms/dbd_pega_CNVBAN_ReqQ">
<properties.wmqJms
baseQueueName="SRV00026.201206.BAN"
baseQueueManagerName="TEST"/>
</jmsQueue>
<jmsQueue id="jms/dbd_pega_CNVBAN_RplQ" jndiName="jms/dbd_pega_CNVBAN_RplQ">
<properties.wmqJms
baseQueueName="BAN.RPL.BAN"
baseQueueManagerName="TEST"/>
</jmsQueue>
<jmsActivationSpec id="prpc_j2ee14_ws/CnvMQIbanServices.jar/CnvMQIbanServices_J2CMessageEndpoint">
<properties.wmqJms
transportType="CLIENT"
destinationRef="jms/dbd_pega_CNVBAN_ReqQ"
destinationType="javax.jms.Queue"
hostName="localhost"
port="5704"
channel="BAN.TEST.T1"
queueManager="TEST"/>
</jmsActivationSpec>
</server>

If I import a MDB Listener into an application in Websphere Application Server I know that I need to bound the MDB Listener.jar file to the activation spec, so in this case in bound CnvMQIbanServices.jar to eis/dbd_pega_cnvbanQAS, I'm missing this but how do I need to put this in the server.xml and am I maybe missing something else?

Gas
  • 17,601
  • 4
  • 46
  • 93
Fabian
  • 1
  • 2
  • You should dobule check your application and mdb name. Active spec id should be in the format `applicationName/moduleName/beanName` where applicatonName is the name of the ear, moduleName, name of the module with MDB, and bean name name of the actual MDB. If you just deploy jar you can omit the applicationName. App and module names are without extensions. So in your case it probably should be something like `id="CnvMQIbanServices/CnvMQIbanServices_J2CMessageEndpoint"`. Attach any errors from the message.log from strartup. – Gas May 08 '19 at 12:09
  • If I check how it is in in the Websphere Application Server and go to: "Enterprise Applications > prpc_j2ee14_ws > Manage message endpoints" I see the following: prpc_j2ee14_ws#CnvMQIbanServices.jar#CnvMQIbanServices_J2CMessageEndpoint (eis/dbd_pega_cnvbanQAS) So I need to edit this line: into ? I have tried both, but for both I don't get a message in logs that the MDB has been bound to the activation specification. – Fabian May 08 '19 at 12:47

1 Answers1

0

In order to determine if you are using the correct value for the jmsActivationSpec id, look in the messages.log file after starting your server for a warning such as the following,

com.ibm.ws.ejbcontainer.mdb.internal.MDBRuntimeImpl          W CNTR4015W: The message endpoint for the {MDB_NAME} message-driven bean cannot be activated because the {ACTIVATION_SPEC_NAME} activation specification is not available. The message endpoint will not receive messages until the activation specification becomes available.

Use the value that you see for {ACTIVATION_SPEC_NAME} as the jmsActivationSpec id value.

njr
  • 3,399
  • 9
  • 7
  • If I only have this in my server.xml about the activation spec: – Fabian May 08 '19 at 14:02
  • I get the following error if I start the server ```com.ibm.ws.config.xml.internal.ConfigEvaluator W CWWKG0033W: The value [jms/dbd_pega_CNVBAN_ReqQ] specified for the reference attribute [destinationRef] was not found in the configuration ``` – Fabian May 08 '19 at 14:09
  • If I then add this configuration to the server.xml: I don't get the error message in my previous anymore, but also not a message that message-driven bean has been activated or something like that. – Fabian May 08 '19 at 14:31
  • CWWKG0033W indicates an error processing the config, which makes sense if you take away the element that the destinationRef was referring to. The fact that you don't see anything specifically relating to the MDB makes me wonder if the MDB is not being processed or if there is an issue with feature enablement. I would recommend posting the messages log output after starting the server with config as shown in your initial writeup. Are there any warnings or errors showing? Does the list of enabled features that it reports match what you expect? – njr May 09 '19 at 18:05
  • Because of the size of the files I needed to put those somewhere else, you can view them here: https://fil.email/MPxDPeCv And just the be sure, I'm right to put the CnvMQIbanServices.jar file into prpc_j2ee14_ws.ear correct? – Fabian May 10 '19 at 09:17
  • The above logs show wmqJmsClient-2.0 and wasJmsServer-1.0 being used together, which is not a valid combination. The wmqJmsClient feature connects to MQ, not the JMS implementation provided by wasJmsServer. If you were wanting to use wasJmsServer, one of the wasJmsClient features should be used, which will have different properties.wasJms elements. I'm not sure if this might be causing the problem you are seeing because it might instead be the case that wasJmsServer was just superfluous. – njr May 13 '19 at 19:00
  • if I delete the feature wasJmsServer-1.0 I still have the same issue, a message in the message.log that the MDB Listener CnvMQIbanServices.jar is bound to eis/dbd_pega_cnvbanQAS is still missing. – Fabian May 14 '19 at 07:11
  • Sorry that turned out to be a dead end. Regarding the EJB jar - yes, it belongs in the ear. However, I wonder if there is some issue with how it is packaged. From the logs, it looks like a different EJB module, prbeans.jar, is being started successfully, I CNTR4001I: The prbeans.jar EJB module in the prpc_j2ee14_ws application has started successfully. But I don't see any messages for CnvMQIbanServices.jar, so I'd recommend comparing with the one you have working, prbeans.jar, to see what the difference is. Sorry I can't be of any more help on this. – njr May 14 '19 at 18:51