Functionality
This sample shows how to write a JMXBased property sheet where all the configuration parameters are defined using JMX attributes.
Default Behavior
By default, there is no business logic or send logic implemented in the component's code. So it does not send out any message to the output port.
Changes required to use a different CPS
A class which holds the configuration should be created
- This class contains the CPS properties described as JMX attributes.
Add the following lines In etc\ServiceDescriptor.xml under "execution" element after "separate-process" element
Under "servicerefs" element, make the following service reference changes:
AddRemoveAdd 'cpsClass' and 'cpsMandatory' (if the configuration is mandatory) attributes in service-export ant task (present in the target "deploy") in common.xmlas shown below:
Make the following changes to the elements below:
ElementsChanges RequiredILookupConfiguration.java Add method String getConfigurationLookupName(); RuntimeArguments.java Add and implement method String getConfigurationLookupName(); LookupHelper.java Add field String configurationLookupName and initialize in constructor
Add and implement method Object lookupSerializedConfiguration() throws NamingException
DefaultCPS.java Add field DefaultCPSPM configuration
Initialize field configuration in void start(String[] args) and change the throws list accordinglyProvide getter for configuration.
DefaultCPSMessageListener.java Change constructor to take CustomCPSPM instead of RuntimeArguments JMSObjects.java Change DefaultCPSMessageListener constructor in create() method to pass configuration object instead of runtime arguments object