Contents

Functionality

This component is aimed at demonstrating the working of the Component Control Protocol. This sample shows how to handle the events sent from the peer server and how to send service status to the peer server.

Default Behavior

By default, there is no business logic or send logic implemented in the component's code. So it doesn't send out any message to the output port.

For additional information on CCP refer to the Component Control Protocol (CCP) section in the Enterprise Edition Online Documentation.

Changes Required

Changes required to support CCP are as below.

1. The following classes are added to support CCP.

ClassDescription
com.fiorano.edbc.ccpcomponent.ccp.jms.CCPEventHandlerlistens to the events generated by peer server and handles those events.
com.fiorano.edbc.ccpcomponent.ccp.jms.CCPEventGeneratorsends the events from component as JMS messages to the peer server.
com.fiorano.edbc.ccpcomponent.ccp.jms.CCPEventManagerManages the life cycle of CCPEventHandler and CCPEventGenerator.
com.fiorano.edbc.ccpcomponent.ServiceStateHolds the state of the service at a particular instant.
com.fiorano.edbc.ccpcomponent.ccp.ServiceStateListenerMonitors the service state and notifies a change in the service sate.

2. The following changes are made to the generated JMSSample component.

ElementsChanges Required
{ServiceGUID}.java
  • An instance of service state is maintained by the service class and is changed appropriately (CCPComponent.java)
  • The CCPEventManager is created if CCP is enabled in the component.
  • The CCPEventManager is created once the connection is created and before the connection is started.
JMSObjects.java
  • The connection object is made accessible from JMSObjects by means of a public method.
  • The connection start is extracted out as a separate method for CCPEventManager to start up.
etc\ServiceDescriptor.xml
  • Add the following child element to "execution" element at the start

     

  • Add following service references under "servicerefs" element

  • Remove

  • Add the following log module to the existing log modules.

RuntimeArguments.java

Add and implement the method

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 page.
Adaptavist ThemeBuilder EngineAtlassian Confluence