
Configuring the Outbound JMS Adapter
Use
You need to configure the outbound JMS adapter to convert XML messages from the
Integration Engine into JMS messages.To configure the adapter you must specify the following:
Prerequisites
You have:
Procedure
The configuration of the outbound JMS adapter comprises six functional subareas:
Specify the class name as follows:
classname=com.sap.aii.messaging.adapter.ModuleTransport2JMS
This specification is mandatory.
You can set the following general parameters for the outbound JMS adapter:
The default value is
true.This parameter determines whether a transactional JMS session should be used or not. Following processing of a message, a transactional session ends either with a COMMIT, or in the case of an error, with a ROLLBACK.
The default value for this parameter is
0.This parameter determines how long the system waits before processing further messages if an error occurs. In transactional processing, it can make sense to specify a certain time period, for example, because messages remain in the queue following a ROLLBACK.
On the HTTP side, the JMS adapter knows the following message types:
This is essentially a (single or multipart) MIME message with a connection to the transport protocol (HTTP). It transports an XMBMessage.
This is an SAP-defined SOAP message with attachments that is logically based on a multipart-MIME message.
On the JMS side, the JMS adapter knows the following messages:
See the corresponding
The architecture of the JMS adapter is designed so that every HTTP message can be mapped to a JMS message.
In the configuration, specify which message type is to be received:
TransportMessage.type=TransportMessage
or XMBMessageThe proposed value is
XMBMessage.Also specify the JMS message type to be sent:
JMSMessage.type= TextMessage
or BytesMessageThe default value is
JMSTextMessage.In the configuration, specify the transformation class to be used under transformClass. The following classes are supplied:
com.sap.aii.messaging.adapter.trans.JMSTunneling
com.sap.aii.messaging.adapter.trans.JMSSinglePayloadBinding
You can define your own binding at any point and apply it to the JMS adapter by implementing a class that enhances the class com.sap.aii.messaging.adapter.trans.Transform and entering this class as the transformation class. Use the classes JMSTunneling or JMSSinglePayloadBinding as templates; their functions are explained briefly below:
In the class com.sap.aii.messaging.adapter.trans.JMSTunneling, a binding is implemented for each of the following cases:
As you can see from the class name, each binding is a kind of JMS tunneling. This means that the TransportMessage or XMBMessage is transported in the JMS payload.
You do not need to set any further configuration parameters. The message types specified in step 3 control which binding is used at runtime.
In the class com.sap.aii.messaging.adapter.trans.JMSSinglePayloadBinding, a binding is implemented for each of the following cases:
The payload of a TransportMessage is used as the payload of a JMSTextMessage. The value in the HTTP header field is used to determine whether the payload of the TransportMessage is text-based:
content-Type
(= text/...)The payload of a TransportMessage is used as the payload of a JMSBytesMessage. The value in the HTTP header field is used to determine whether the payload of the TransportMessage is not text-based:
content-Type
( <> text/...)The payload of a XMBMessage is used as the payload of a JMSTextMessage. The payload type is used to determine whether the payload of the XMBMessage is text-based: The header data of the XMBMessage is ignored.
The payload of a XMBMessage is used as the payload of a JMSBytesMessage. The payload type is used to determine whether the payload of the XMBMessage is not text-based: The header data of the XMBMessage is ignored.
While JMS is used by the bindings in the class JMSTunneling as a kind of means of transport, bindings in the class JMSSinglePayloadBinding are much more specific.
<port_no>
<service> describes the service part of the URL where the Integration Engine must send its messages.
These specifications are mandatory.
![]()
For example, if you have specified
![]()
The endpoint address must be extended as follows for the Integration Engine in Release 1.0:
http://<JMSAdapterhost>:1234/JMS?action=execute&pipelineid=ReceiverIf the Integration Engine message is sent to a non-specified adapter service, the system displays the following error message:
No registered listener for <Service> found
The system displays the same message if the adapter is initialized, but has not been started (status
STOPPED or INITIALIZED).For more information about provider-specific settings, see
Example
Below is an example configuration for the outbound JMS adapter:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# JMS Adapter Configuration
#
# This configuration can be used as a template to configure the JMS adapter
#
rootDirectory=JMS
#**************************************************************************
#
# uncomment for receiving JMS messages
#classname=com.sap.aii.messaging.adapter.ModuleJMS2Transport
# uncomment for sending JMS messages
classname=com.sap.aii.messaging.adapter.ModuleTransport2JMS
#**************************************************************************
#
# set if a transacted JMS Session should be used (default: true)
#JMSSession.sessionTransacted=true
#JMSSession.sessionTransacted=false
#
# set delay in milliseconds before processing next message after an error
# (default: 0)
#errorDelay=10000
#**************************************************************************
#
# set the message formats you want to process
# formats are only needed if they cannot be evaluated at runtime
#
# JMSMessage Type can be set to TextMessage or BytesMessage
# it is only used for sending JMS messages
#JMSMessage.type=BytesMessage
JMSMessage.type=TextMessage
#
# TransportMessage Type can be set to TransportMessage or XMBMessage
# it is used for sending and receiving TransportMessages and XMBMessages
#TransportMessage.type=TransportMessage
TransportMessage.type=XMBMessage
#**************************************************************************
#
# uncomment and adjust parameters for Transformation Type
# (binding of JMS TransportMessage); insert your class here for an
# individual binding between JMS and TransportMessage
#
# uncomment the following line for using bindings that belong to Tunneling
#transformClass=com.sap.aii.messaging.adapter.trans.JMSTunneling
# uncomment the following line for using bindings that belong to
# SinglePayloadBinding
transformClass=com.sap.aii.messaging.adapter.trans.JMSSinglePayloadBinding
#
# the following parameters are used in bindings that belong to
# SinglePayloadBinding and require XMBHeader Information
#
# uncomment and adjust parameters according to your requirements
#XMB.SenderBusinessSystem=ExtAdapterSender
#XMB.SenderInterfaceNamespace=http://sap.com/xi/xidemo
#XMB.SenderInterfaceName=ExtAdapterSenderIF
#XMB.ReceiverBusinessSystem=ExtAdapterReceiver
#XMB.TraceLevel=1
#XMB.LoggingLevel=1
#XMB.QualityOfService=EO
#XMB.QueueId=ABCDEFABCDEF
#XMB.ContentType=text/xml
#**************************************************************************
#
# uncomment and adjust parameters for XMB.Receiver
XMB.httpPort=3333
XMB.httpService=/JMS
# uncomment and adjust parameters for XMB.Sender
#XMB.TargetURL=http://pwdf0436:8082/sap/xi/engine?type=entry
#**************************************************************************
#
# uncomment and adjust parameters for creating SonicMQ
# JMS administrated objects
JMS.QueueConnectionFactoryImpl.classname=progress.message.jclient.QueueConnectionFactory
JMS.QueueConnectionFactoryImpl.constructor=java.lang.String p49512:2506
JMS.QueueImpl.classname= progress.message.jclient.Queue
JMS.QueueImpl.constructor=java.lang.String SampleQ1
#
# uncomment and adjust parameters for creating MQSeries
# JMS administrated objects
#JMS.QueueConnectionFactoryImpl.classname=com.ibm.mq.jms.MQQueueConnectionFactory
#JMS.QueueConnectionFactoryImpl.method.setHostName=java.lang.String p24537
#JMS.QueueConnectionFactoryImpl.method.setChannel=java.lang.String JAVA.CHANNEL
#JMS.QueueConnectionFactoryImpl.method.setTransportType=java.lang.Integer {com.ibm.mq.jms.JMSC.MQJMS_TP_CLIENT_MQ_TCPIP}
#JMS.QueueConnectionFactoryImpl.method.setQueueManager=java.lang.String QM_p24537
#JMS.QueueImpl.classname= com.ibm.mq.jms.MQQueue
#JMS.QueueImpl.constructor=java.lang.String postcard
#JMS.QueueImpl.method.setTargetClient=java.lang.Integer {com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++