Skip to main contentCarbon Design System

Message driven bean scripting

Customers often need to add new Message Driven Beans for consuming messages from an external JMS server. Maximo scripted MDBs from or 8.8.

To set up MDB with scripting:

  1. Create the following vanilla py script (for example, named as CUSTMDB).
service.log("msg received with id "+str(jmsmsg.getJMSMessageID()))

Note that jmsmsg refers to the javax.jms.Message object representing the message from the JMS queue.

  1. Assume that you are going to consume message from an external continous queue named extcqin. Therefore, you will use the external system EXTSYS1 to import a file. For example, you import an asset with the content.

  2. Modify the mboejb ejb jar xml to add a script MDB using the ejb-jar.xml file. This connects the script to the MDB.

<message-driven id="MessageDriven_JMSContQueueProcessor_3">

Note the ejb class psdi.iface.jms.JMSScriptListenerBean and the env entry SCRIPTNAME has the name of the script. A script on an object structure such as MXITEM, can impact the processing of item data through REST, application Import, Enterprise Service and Invocation/Publish Channel.

  1. Deploy the customization.

Assuming that the activation spec and queue setup are all done, you should be able to see the log statement appear as you start pushing messages into the queue.