Show TOC

Connecting to the Communication Channel MonitorLocate this document in the navigation structure

Use

The communication channel monitor allows a system administrator to call information about communication channels and to administrate them.

The monitor provides current runtime information about the adapters of a communication channel. It also provides a connection to alerting.

Interface Overview

Characteristic Value

Name

Adapter Administration und Monitoring (AAM)

Purpose

Queries the communication channel status, administration of channels (start, stop)

Connection to the Alert Framework

Type

Service in the facade com.sap.aii.af.svc.facade

Technical name

com.sap.aii.af.service.administration.api, com.sap.aii.af.service.administration.api.i18n, com.sap.aii.af.service.administration.api.monitoring

Certification

Mandatory

Syntax

Javadoc package com.sap.aii.af.service.administration.api and sub packages

Integration
  • You start the communication channel monitor in the Runtime Workbench in Component Monitoring.
    • Select an Adapter Engine.
    • On the Status tab page, choose Communication Channel Monitoring.
  • In the PCK, you call the monitor using the link on the PCK start page.
  • For information about using the communication channel monitor: Communication Channel Monitor .
Features

The APIs for communication channel monitoring are located in the hierarchy under the Adapter Framework service package com.sap.aii.af.service.administration.api.

  • Registration and callback interfaces: com.sap.aii.af.service.administration.api
  • Channel-related interfaces and APIs:

    com.sap.aii.af.service.administration.api.cpa

  • Monitoring interfaces and APIs:

    com.sap.aii.af.service.administration.api.monitoring

  • Localization interfaces and APIs:

    com.sap.aii.af.service.administration.api.i18n

Activities

Registering/Deregistering Adapters

  • Register your adapter with the Adapter Framework core service. To do this, use the method AdapterRegistry.registerAdapter(String, String, AdapterCapability[], AdapterCallback[]).

    An adapter is identified uniquely by its name and namespace. Enter these two values as the first two parameters in the method call.

    For the example adapter, the adapter name is JCA and the namespace is http://sap.com/xi/XI/sample.

    In the case of incompatible adapter changes, select a different namespace for the adapter. The adapter will then register itself for all communication channels.

  • Specify the adapter capabilities:
    Adapter Capability Description

    AdapterCapability.NONE

    No particular capabilities are supported.

    AdapterCapability.PUSH_CHANNEL_STATUS

    This allows the adapter to forward information about the status of the communication channel to the AAM framework (more information below under Push mechanism).

    AdapterCapability.PUSH_PROCESS_STATUS

    This allows the adapter to forward process status information to the AAM framework (more information below under Process status).

    Process status information can trigger SAP alerts (more information below).

  • The AdapterCallback parameter transfers the classes that implement the AAM callback interfaces to the AAM framework.

    In the case of the example adapter, XIConfigurationimplements the following interfaces:

    • ChannelLifecycleCallback
    • ChannelStatusCallback
    • LocalizationCallback

    However, it is possible that these interfaces are implemented by different classes, which are then transferred by the AdapterCallback parameter.

  • Make sure that you call the method unregisterAdapter(String, String) once the adapter has been terminated.
    Note

    Open XIConfiguration.java and search for the character strings CS_ADMONR and CS_ADMOND.

    Under CS_ADMONR, the registration of the adapter with the AAM framework is displayed.

    Under CS_ADMOND, the deregistration of the adapter with the AAM framework is displayed.

Monitoring

In the communication channel monitor, you can monitor two types of status: the channel status and the process status.

  • The channel status displays whether a channel has started and is processing messages successfully, whether it has encountered a configuration error, or whether it has stopped. To determine the channel status, the AAM framework provides a polling and a push mechanism.
    • Polling mechanism

      Implement the ChannelStatusCallback interface so that the AAM framework calls a callback as soon as a user wants to get status information about a channel in communication channel monitoring.

      The getChannelStatus method is then called. The AAM framework expects the ChannelStatuscontainer to be filled with status information. Use the ChannelStatusFactory to get an instance of this class.

      Use the registerAdapter API to register the ChannelStatusCallback implementation with the AAM framework.

      Note

      Open XIConfiguration.java and search for the character string CS_ADMON.

      There is a description of how to determine the channel status.

    • Push mechanism

      The adapter provides the AAM framework with status information during runtime. The AAM framework supports this mechanism with the reportChannelStatus methods of the MonitoringManager.

      To get an instance, use MonitoringManagerFactory.

    The process status is reported to the AAM framework exclusively by the reportProcessStatus methods of the MonitoringManager interface.

    The channel status corresponds to the Status column in the communication monitor. The process status is displayed in the Processing Errors column.

Localization

The AAM framework supports the LocalizationCallbackinterface. When an adapter registers an instance of this interface with the AAM framework, this callback is called for each string provided to the AAM framework, before it is displayed to the user.

Note

The callback is not called for text information from ChannelStatusCallback.

Open XIConfiguration.java and search for the character string CS_LOCAL.

A general LocalizationCallback implementation is provided with the ResourceBundleLocalizationCallback class.

Connecting to the Alert Framework

The AAM framework offers an option to trigger alerts, which, for example, send SMS messages to an administrator. To do this, the adapter must report an error with the value FATAL for the process status.

This happens by way of the reportProcessStatus() call. The adapter must specify that it supports the process status at registration using AdapterCapability.PUSH_PROCESS_STATUS. You configure alert rules in the Alert Framework.

More information: Alert Configuration

Note

For an example sender adapter, you can set the Raise Error Condition (demo) parameter to Raise Rollback .... This triggers an error in sender message processing. In addition, a FATAL process status is reported to the AAM framework.

Open SPIManagedConnectionFactory.java and search for the character string CS_CS_PROCALERT.