WAS v8.5 > Develop applications > Develop SCA composites > Specify bindings in an SCA environment > Configure the SCA JMS binding

Invoking operations using JMS binding operation selection

We can invoke an operation using JMS binding operation selection. By default, a JMS binding uses the JMS binding operation selection.


Configure the JMS binding for the SCA application.

The JMS binding operation selection is the default binding selection. Thus, this operation selection applies if no operation selection element is specified in the composite definition file. To specify the JMS binding operation selection, add the following operation selection element to the composite definition file:

OSOA

OASIS

Specify a JMS binding operation selection on an SCA service interface and on an SCA reference.

  1. In a composite definition file, specify a JMS binding operation selection on an SCA service interface.

    Because a given service can define multiple operations, the runtime environment must define mechanisms and algorithms to take a message from a destination bound from an SCA service using the SCA JMS binding, and invoke the correct operation on the SCA service implementation.

    The JMS binding defines a String message property called scaOperationName. When receiving a request at a service, or a callback at a reference, the JMS binding uses the following algorithm to determine the operation name:

    1. If there is only one operation on the service interface, it is assumed that this operation is the operation name for the request.
    2. Otherwise, if the JMS property scaOperationName is set, the value of this property is used as the operation name.
    3. Otherwise, if the message is a JMS text or bytes message containing XML, then the selected operation name is taken from the local name of the root element of the XML payload. This operation selection behavior is only supported over the jmsdefault and the jmsTextXML and jmsBytesXML wire formats.
    4. Otherwise, it is assumed the operation name is onMessage.

  2. In a composite definition file, specify a JMS user property operation selection on an SCA reference.

    When using the JMS user operation selector on the service side, the reference side or service side callback must set the matching JMS user property. In the service-side example, the operation selector uses the value of the jmsTestUserProp to determine the target operation. We can set this property for the reference or callback side by specifying one or more header properties in the operationProperties element; for example:

      <operationProperties name="proxyMethodName"> <headers> <property name="jmsTestUserProp">remoteMethodName</property> </headers> </operationProperties>

    In the example, a call to the proxyMethodName on the reference side sets the jmsTestUserProp user property to remoteMethodName. The proxyMethodName target operation is set to remoteMethodName when the service-side operation selector is configured as in the previous step.


Results

You have configured a JMS binding operation selection.

Deploy and test the operation selection in your SCA application.


Related


Configure the SCA JMS binding
Invoking operations using JMS user property operation selection


Reference:

Service Component Architecture specifications and APIs


+

Search Tips   |   Advanced Search