Functionality
This sample shows how to port properties (which can be set in Properties window when a port is selected in Studio) for creating JMS objects and setting message properties
Default Behavior
By default, this component listens for messages at the input port and send them to the output port after setting timetolive, priority, and persistent properties on the message.
Changes required
In the service references under "servicerefs" element in ServiceDescriptor.xml, make the following changes:
AddRemoveMake the following changes to the respective elements below:
ElementsChanges RequiredPortHandler.java Add this class which holds a destination and PortInstance(properties set on port) object LookupHelper.java - Add and implement methods
- Object lookupInputPorts() throws NamingException
- Object lookupOutputPorts() throws NamingException
- Collection lookupPorts(String portsLookupName) throws NamingException
JMSObjects.java - Remove ERROR_PORTNAME, INPUT_PORTNAMES, OUTPUT_PORTNAMES and their references
- Change create method to use methods added in lookuphelper to lookup for ports and their properties
- Rename outputDestinations to outputHandlers
- Add PortHandler objects to ouputHandlers instead of Destination objects
- Use port properties to create appropriate type of subscriber.
PortPropertiesMessageListener.java Implement 'send message' to send the message received to all output ports(including ON_EXCEPTION) after setting appropriate values for persistence,timetoliveand priority while sendingmessage.
- Add and implement methods