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 220.127.116.11 or 8.8.
To set up MDB with scripting:
- Create the following vanilla py script (for example, named as CUSTMDB).
service.log("msg received with id "+str(jmsmsg.getJMSMessageID()))
jmsmsg refers to the
javax.jms.Message object representing the message from the JMS queue.
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.
Modify the mboejb ejb jar xml to add a script MDB using the ejb-jar.xml file. This connects the script to the MDB.
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.
- 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.