Contents

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

  1. In the service references under "servicerefs" element in ServiceDescriptor.xml, make the following changes:

    Add
    Remove
  2. Make the following changes to the respective elements below:

    Elements
    Changes Required
    PortHandler.javaAdd 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.

Icon
  • To check the functionality of this component, it should be registered with the server.
  • The steps to register the samples is specified in the Sample Templates section.

 

 

 

Adaptavist ThemeBuilder EngineAtlassian Confluence