Configuring the JMS Adapter

11
PRINT FROM SAP HELP PORTAL Document: Configuring the JMS Adapter URL: http://help.sap.com/saphelp_nw73/helpdata/en/cd/d85a9d6fab7d4dbb7ae421f710626c/content.htm Date created: August 02, 2013 © 2013 SAP AG or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software com ponents of other software vendors. National product specifications m ay vary. These m aterials are provided by SAP AG and its affiliated com panies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered tradem arks of SAP AG in Germ any and other countries. Please see www.sap.com /corporate-en/legal/copyright/index.epx#tradem ark for additional tradem ark inform ation and notices. Note This PDF document contains the selected topic and its subtopics (max. 150) in the selected structure. Subtopics from other structures are not included. PUBLIC © 2013 SAP AG or an SAP affiliate company. All rights reserved. Page 1 of 11

description

How to configure SAP JMS Adapter

Transcript of Configuring the JMS Adapter

Page 1: Configuring the JMS Adapter

PRINT FROM SAP HELP PORTALDocument:Configuring the JMS Adapter

URL:http://help.sap.com/saphelp_nw73/helpdata/en/cd/d85a9d6fab7d4dbb7ae421f710626c/content.htm

Date created:August 02, 2013

© 2013 SAP AG or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the expresspermission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietarysoftware components of other software vendors. National product specifications may vary. These materials are provided by SAP AG and its affiliated companies ("SAP Group") forinformational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The onlywarranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing hereinshould be construed as constituting an additional warranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks orregistered trademarks of SAP AG in Germany and other countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark informationand notices.

NoteThis PDF document contains the selected topic and its subtopics (max. 150) in the selected structure.Subtopics from other structures are not included.

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 1 of 11

Page 2: Configuring the JMS Adapter

Configuring the JMS Adapter

UseThe JMS adapter (Java Message Service) enables you to connect messaging systems to the Integration Engine or the PCK.The adapter supports the JMS specifications 1.02b and 1.1.For more information about the SAP JMS provider, see:

JMS Administration

For FAQs about the JMS adapter, see SAP Note 856346.

Prerequisites● You must install the corresponding JMS driver to use the JMS adapter.

The required Java libraries are product-specific and can be obtained from either the product vendor or other providers.

● Following installation, you must deploy the libraries on the AS Java so that the JMS adapter can access the required Java classes at runtime.

● If you are using MQSeries 53x.xxx, you must enter the following JAR files in com.sap.aii.adapter.lib.sda:

○ com.ibm.mq.jar○ com.ibm.mqbind.jar○ com.ibm.mqjms.jar○ connector.jar (use the JAR file from the AS Java client directory)

Procedure 1. Create a communication channel in the Integration Directory. 2. To configure the adapter, select the Parameters tab page. 3. Select JMS as the Adapter Type.

Defining the Direction of the Adapter 4. Define the adapter.

The parameters that you have to enter for the adapter depend on the Direction you want the adapter to have (sender/receiver).

Configuring the Sender JMS Adapter

Configuring the Receiver JMS Adapter

5. You can add your own modules to the adapter.

See: Adding Modules in the JMS Adapter

More InformationFor information about connecting asynchronous and synchronous systems, see Async/Sync and Sync/Async Bridges in the JMS Adapter.

JMS Publish/Subscribe and Point-to-Point Communication The JMS adapter supports both JMS publish/subscribe and point-to-point communication.In publish/subscribe communication, messages are stored in a topic. If multiple sender channels subscribe to the same JMS topic, they all receive a copy of theJMS message before it is deleted from the JMS topic.The JMS adapter supports only durable subscribers. Each active subscriber receives a copy of the message. A copy of the message is retained for everyinactive durable subscriber.In JMS point-to-point communication, messages are stored in queue. If multiple sender channels connect to the same JMS Queue, only one of the senderchannels receives a JMS message. This is because the JMS message is deleted from the queue once is has been successfully received from the JMS Queue.In a clustered environment, when multiple instances of a channel connecting to a JMS Topic are activated, and the instances would try and connect to the sameJMS topic using the same subscription ID. This is not allowed and most likely results in an exception.More information: Configuring the Sender JMS AdapterConfiguring the Receiver JMS Adapter

JMS Adapter Overview

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 2 of 11

Page 3: Configuring the JMS Adapter

Characteristic Values More Information

Transport Protocol SonicMQ JMS ProviderWebSphereMQ (MQ Series) JMS ProviderJNDI JMS Provider LookupJMS Provider Administered Objects via FileGeneric JMS Provider

Message Protocol JMS 1.x

Quality of Service Exactly OnceExactly Once In Order

Quality of Service

Attachments No

Attributes in Message Header Sender and receiver SAP NetWeaver Library under SAP NetWeaverProcess Integration → Special Development Tasks → Applying Advanced Routing Techniques →Using Adapter-Specific Message Attributes in theMessage Header

Acknowledgments Acknowledgment Support in the Adapter Engine

Module Processor In the module processor, you can specify genericmodules that equip the adapter with additionalfunctions.

Adding Modules in the JMS AdapterModule Processor

Security SAP NetWeaver PI Security Guide

Configuring the Sender JMS Adapter You need to configure the sender JMS adapter to send JMS messages to the Integration Engine or the PCK.

PrerequisitesThere can only be one sender agreement for the defined communication channel.

Procedure1. Under Transport Protocol, select the JMS provider:

SonicMQ JMS ProviderWebSphereMQ (non-JMS)Access JMS Provider with JNDI(Read) JMS Provider Administered Objects from FileAccess JMS Provider Generically

2. The Message Protocol is JMS 1.x.3. Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.

This selection is not available in the PCK.

Defining Connection Parameters

1. Select the Source tab page.2. If you want to connect to a JMS topic, select the Enable Topic Support checkbox.3. Depending on the transport protocol you have selected, enter the JMS provider connection parameters.

Defining SonicMQ JMS Provider SettingsDefining WebSphereMQ (MQ Series) JMS Provider SettingsDefining JMS Provider Settings for JNDI AccessSpecifying Files for Administrable Objects of the JMS ProviderDefining Generic Access to the JMS Provider

4. To make additional settings or replace the default settings, select Set Additional JMS Parameters or Replace Default Settings and enter the parameters andvalues in the table.

For example, you can set the following parameters and values:JMSMessageClass with value com.ibm.jms.JMSMessageJMS.Messagè.method.setStringProperty with value java.lang.String XAppId, java.lang.String myapp

Defining Initial Context Properties

Example

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 3 of 11

Page 4: Configuring the JMS Adapter

1. Specify the Initial context properties name and value in the table. Before SAP NW PI 7.20 release, initial context properties could be specified in theAdditional Parameters table. Now this can be specified as:

Name Value

propertyName propertyValue

Both propertyName and propertyValue are Strings.This table is available only if you select the Transport Protocol as JNDI JMS Provider Lookup.

Defining JMS Settings

1. Select the Processing tab page.2. If you want to use a transactional JMS session, select Transactional JMS Session.

The transactional JMS Session is the default setting and is recommended. If you do not use this setting, then the message delivery is not guaranteed. Themessage can be lost in such a case.Following processing of a message, a transactional session ends either with a COMMIT, or in the case of an error, with a ROLLBACK.

3. Enter the User and the Password with confirmation for accessing the JMS Queue/Topic.4. Under JMS Message Selector, specify conditions that a JMS message in the specified JMS queue must fulfill to be processed by the sender adapter.

For more information about the JMS message selector, see java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html under javax.jms andMessage.

Defining Correlation Settings

1. Determine which algorithm is to be used to create the message ID of a new PI message.The ID must be a Globally Unique Identifier (GUID) according to ISO 11578.If the message ID is not a GUID, message processing fails. If the ID is not unique, this can result in message duplicates. This can also lead to aGUIDFormatException.

Set the P I Message IDTo:GUID (Recommended Value)JMSMessageID (Uniqueness Is JMS-Provider-Dependent)JMSCorrelationID (Uniqueness Is JMS-Sender-Dependent)JMSProperty (Uniqueness Is JMS-Sender-Dependent)Enter the JMS Property Name. This value is set for the PI message ID.If the JMSCorrelationID or JMSProperty are not set in the JMS message, a message ID is generated automatically.

If you have selected JMSMessageID, JMSCorrelationID, or JMSProperty and entered a JMS message ID in these fields, select Remove 'ID:' Marker fromJMSMessageID indicator.The JMS specification stipulates that each JMS message ID starts with 'ID'. However, this conflicts with ISO-11578.Set PI Conversation ID (ConversationID) To:

No valueThe PI Conversation ID is not set.JMSMessageID (Uniqueness Is JMS-Provider-Dependent)JMSCorrelationID (Uniqueness Is JMS-Sender-Dependent)JMSProperty (Uniqueness Is JMS-Sender-Dependent)Enter the JMS Property Name. This value is set for the PI message ID.Stored JMSCorrelationID of requestThe saved JMSCorrelationID of the request is used.

Defining the Duplicate Handling Settings

If you want to set an alert for the duplicate messages, select Enable Duplicate Handling, then perform the following substeps.1. Enter Duplicate Message Threshold to set a value, beyond which an alert will be raised for the duplicate messages.

If you enter a value n for duplicate message threshold, an alert will be raised for the n+1 duplicate message.

2. If you want to disable the channel (that is to stop further processing of messages) after the duplicate threshold is exceeded, select Disable Channel IfThreshold Exceeded

If you want the duplicate messages received from different channels (that is JMS Messages with the same Message ID) to be processed as a distinct JMSmessages and not as duplicate messages, select Prefix Channel ID to JMS Message ID

You use this option only for channels connecting to JMS Queue.This is a default function for channels connecting to JMS Topic.

Defining the Connector Settings

Note

Note

Example

Note

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 4 of 11

Page 5: Configuring the JMS Adapter

If you want to receive messages from the JMS Provider using message listener, select Use Message Listener Based Connector.If you want to receive messages from the JMS provider using message polling, then perform the following substeps.1. Enter the Message Poll Interval (msecs) to specify the time period between the calls to receive messages from the JMS provider destinations.2. Enter the Message Receive Wait Time (msecs) to specify the timeout value specified to the receive() call used for receiving messages from JMS Provider

destinations.

This is default approach to receive messages from the JMS provider.Message Polling based approach for receiving messages from JMS Provider destinations is the recommended approach.

Defining PI Settings

1. Select the Mapping of Message:If you want the JMS payload to contain the entire message, choose Entire Message = JMS Payload.If you only want the JMS payload to contain the payload of the message, choose Message Payload = JMS Payload.

2. In the Quality of Service drop-down, choose the type of quality of service (QoS) and perform the following sub-steps:.1. In the Queue ID field, enter the queue ID.

This option is available only for the Exactly Once in Order QoS.

2. In the Processing J2EE Cluster Server (Cluster ID) field, enter the cluster ID of the node on which you want the JMS adapter to process the message.

If you do not specify the cluster ID, the JMS adapter executes the message on the first available node in the cluster.This option is not applicable for channels that connect to JMS queues and have an Exactly Once QoS.Channels connecting to JMS topics are active on only one node irrespective of the QoS configuration.

For more information, see Quality of Service3. To check for duplicate messages, IDs must be saved in the database. To prevent the database from getting unnecessarily large, these IDs are deleted after a

certain amount of time.Under Time Period for Duplicate Check for EO(IO) (secs), specify when the IDs are to be deleted.For example, if you check message monitoring daily, deletion can take place after one day.

Defining Error Handling Settings

1. Under Wait After Message Error (msecs), enter the number of milliseconds that the adapter must wait when a processing error occurs, before furthermessages are processed.In transactional processing, it can make sense to specify a certain time period, for example, because messages with errors remain in the queue following aROLLBACK.

2. Under Wait Before Reconnect (msecs), specify a period of time after which an attempt is made to reestablish a connection following a connection error on theJMS side.If you enter -1, no attempt is made to reestablish the connection.Your JMS provider must support the registration of an ExceptionListener for this.

Defining Adapter-Specific Message Attributes

1. Select the Advanced tab page.2. To save adapter attributes in the message header of the PI message, select Set Adapter-Specific Message Attributes.

To apply the following attributes in the PI message header, set the corresponding indicators:JMS Message Correlation ID: (technical name: DCJMSCorrelationID)JMS Message Delivery Mode: (technical name: DCJMSDeliveryMode)JMS Message Destination: (technical name: DCJMSDestination)JMS Message Expiration: (technical name: DCJMSExpiration)JMS Message ID: (technical name: DCJMSMessageID)JMS Message Priority: (technical name: DCJMSPriority)JMS Message Redelivered Flag: (technical name DCJMSRedelivered)JMS Message ReplyTo Destination: (technical name: DCJMSReplyTo)JMS Message Time Stamp: (technical name: DCJMSTimestamp)JMS Message Type: (technical name: DCJMSType)Used JMS Message Selector: (technical name: DCJMSMessageSelector)Used JMS Message Queue: (technical name: DCJMSMessageQueue)JMS User: (technical name: DCJMSUser)If you want to set additional JMS message attributes, select Specify Additional JMS Message Properties (Maximum of 10).

In the table, enter the names of the JMS message properties whose values are to be included in the message header of the PI message.The technical names of the additional attributes are DCJMSMessageProperty0, DCJMSMessageProperty1, ..., DCJMSMessageProperty9.You can enter more than ten properties in the table. However, only the first ten are taken into account.The attribute namespace for the adapter is http://sap.com/xi/XI/System/JMS.

Defining the Adapter Status

Note

Note

Note

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 5 of 11

Page 6: Configuring the JMS Adapter

1. Set the adapter to Active to enable messages to be exchanged.

Defining Additional Parameters

Specify the additional parameter Names and parameter Values in the table.

For example, if you are connecting to a third party JMS provider you can enter the client ID and its corresponding value for each channel. However, these arespecific to the third-party provider.For more information , see the documentation of the third-party provider.

Configuring the Receiver JMS Adapter

UseYou configure the receiver JMS adapter to be able to convert PI messages from the Integration Server or the PCK into JMS messages.

Procedure 1. Under Transport Protocol, select the JMS provider:¡ SonicMQ JMS Provider¡ WebSphereMQ (MQ Series) JMS Provider¡ JNDI JMS Provider Lookup¡ JMS Provider Administered Objects via File¡ Generic JMS Provider 2. Select the Message Protocol as JMS 1.x. 3. Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.

This selection is not available in the PCK.

Defining Connection Parameters 4. Select the Target tab page.

For Generic JMS Provider, connection settings are specified in the Additional Parameters table.

5. If you want to connect to a JMS topic, select the Enable the Topic Support checkbox.

By default, JMS provider enables the queue support.

6. Depending on the transport protocol you have selected, enter the connection parameters for the JMS provider.Extra connection parameters can be specified in the Additional Parameters table of the Advanced tab page. Depending on the third party JMS provider, you mayneed to set a unique ClientID (for each channel) using the additional parameter table.The function for setting the ClientID is provider-specific.

Defining Connection On Demand 7. From the Transport Protocol dropdown listbox, choose WebSphereMQ (MQSeries) JMS Provider. 8. Select the Create Connection on Demand checkbox. 9. In the Connection keep alive (secs), specify a value that determines the duration of the connection.

● The keep alive period determines how long the connection must be kept open after the delivery of a message.○ If the value is zero, the JMS receiver adapter opens the connection and closes it immediately after delivering the message.○ If the value is greater than zero, the JMS receiver adapter opens the connection for the first incoming message, delivers the message and closes theconnection after the keep alive period lapses. If there are subsequent messages received during this active connection period, the adapter delivers thesemessages, resets the keep alive period everytime it delivers a message. and closes the connection after the keep alive period lapses for the last deliveredmessage.● The JMS receiver adapter cannot reconnect automatically to the JMS provider in the event of the provider failure.

Initial Context Properties 10. Specify the Initial context properties name and value in the table. Before SAP NW PI 7.20 release, initial context properties could be specified in theAdditional Parameters table.

Now this can be specified as:

Example

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 6 of 11

Page 7: Configuring the JMS Adapter

Name Value

propertyName propertyValue

Both propertyName and propertyValue are Strings.

This table is available only if you select the Transport Protocol as JNDI JMS Provider Lookup.

Defining JMS Settings 11. Select the Processing tab page. 12. If you want to use a transactional JMS session, select Transactional JMS Session.

The transactional JMS Session is the default setting and is recommended. If you do not use this setting, then the message delivery is not guaranteed.

The message can be lost in such a case

Following processing of a message, a transactional session ends either with a COMMIT, or in the case of an error, with a ROLLBACK.

13. Select the Delivery Mode of Message Producer:¡ Persist JMS Messages in the JMS Provider¡ Do Not Persist JMS Messages in the JMS Provider 14. Under JMS ReplyTo Queue Name, specify the name of the queue to which the responses are to be sent. 15. Under JMS Message Expiration Period (msecs), specify the expiry period of the JMS message in milliseconds. 16. Specify the JMS Message Priority (optional). 17. Enter theUser and the Password with confirmation for accessing the JMS Queue/Topic.

Defining Correlation Settings 18. Set the JMS Correlation ID to:¡ PI Message ID (MessageID) (default value)¡ PI Reference ID (RefToMessageID)¡ PI Conversation ID (ConversationID)¡ No value 19. If you want to save the JMS correlation ID of the request, select Store JMSCorrelationId of Request. 20. Specify what the JMS Property is to be set to. 21. Select the Value of the JMS Property:¡ PI Message ID (MessageID) (default value)¡ PI Reference ID (RefToMessageID)¡ PI Conversation ID (ConversationID)¡ No value

Defining PI Settings 22. Select the Mapping of Message:¡ If you only want the JMS payload to contain only the payload of the PI message, choose Message Payload = JMS Payload. (default setting)¡ If you want the JMS payload to contain the entire PI message, choose Entire Message = JMS Payload. 23. The adapter can identify whether the connection has been terminated between the JMS commit and the commit in the database of the Adapter Framework.The adapter identifies the resulting duplicate data record.

Select Handling of Pending PI Messages:

¡ Throw Exception (Message Retry Possible Later) (default)¡ Bypass Pending Warning and Send Message to JMS (Duplicates Possible)A duplicate data record is created if the JMS commit is executed, but not the commit in the database of the Adapter Framework. If you select this option, you mustmake sure that this message has not yet been received in the JMS environment.¡ Mark Message as Delivered (Message Loss Possible)The message is lost if the JMS commit is not yet executed. If you select this option, you must make sure that this message has already been received in the JMSenvironment.

For an example of how this parameter is used, see below under Example.

24. Under Time Period for Duplicate Check for EO(IO) (secs), specify when the IDs are to be deleted.

To check for duplicate messages, IDs must be saved in the database. To prevent the database from getting unnecessarily large, these IDs are deleted aftera certain amount of time.

For example, if you check message monitoring daily, deletion can take place after one day.

25. If the JMS receiver is an application, the JMS adapter should return a delivery acknowledgment. Select Send PI Delivery Acknowledgment (Adapter IsEndpoint).

Defining Error Handling Settings 26. Under Wait Timer After Message Error (msecs), enter the number of milliseconds that the adapter must wait when a processing error occurs, before furthermessages are processed.

In transactional processing, for example, it can make sense to specify a certain time period, because messages with errors remain in the queue following aROLLBACK.

27. Under Wait Before Reconnect (msecs), specify a period of time after which an attempt is made to reestablish a connection following a connection error on theJMS side.

If you enter -1, no attempt is made to reestablish the connection.

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 7 of 11

Page 8: Configuring the JMS Adapter

Your JMS provider must support the registration of an ExceptionListener for this.

28. If the JMS provider does not call the ExceptionListener registered by the JMS adapter when a connection error occurs, you can force the connection to bereestablished by setting the parameter Reconnection if Exception Text Starts with.

If a JMS exception is thrown when sending a message, the free text specified here is compared with the specified string. Once the period of time specifiedin Wait Before Reconnect (msecs) has passed, an attempt is made to reestablish the connection.

Only set this parameter if your JMS provider does not support the registration of an ExceptionListener.

Defining Adapter-Specific Message Properties 29. Select the Advanced tab page. 30. To evaluate adapter-specific properties in the message header of the PI message, select Use Adapter-Specific Message Properties. 31. If you want missing message attributes to trigger an error message, select Fail On Missing Adapter Message Properties.

If the indicator is set and the header for adapter-specific message attributes or one of the set attributes is missing from the message, this leads to a deliveryexception in the audit log of the message.

If you do not set the indicator, and message attributes are missing, the adapter accesses information from the adapter configuration.

32. To evaluate the following attributes in PI message headers, set the corresponding indicators:¡ JMS Message Correlation ID: (technical name: DCJMSCorrelationID)¡ JMS Message Expiration: (technical name: DCJMSExpiration)¡ JMS Message Priority: (technical name: DCJMSPriority)¡ JMS Message ReplyTo Destination: (technical name: DCJMSReplyTo)¡ JMS Message Time stamp: (technical name: DCJMSTimestamp) 33. If you want to set additional JMS message attributes, select Specify Additional JMS Message Properties (Maximum of 10).¡ In the table, enter the Name and Java Type of the JMS message properties whose values are to be included in the message header of the PI message.Under Java Type, you define the JMS Java message type for the attribute in the created JMS message. You can enter the following:§ boolean§ byte§ short§ int§ long§ float§ double§ string

The technical names of the additional attributes are DCJMSMessageProperty0, DCJMSMessageProperty1, ..., DCJMSMessageProperty9.

You can enter more than ten properties in the table. However, only the first ten are taken into account.

The attribute namespace for the adapter is http://sap.com/xi/XI/System/JMS.

Defining the Adapter Status 34. Set the adapter to Active to enable messages to be exchanged.

Defining Additional Parameters 35. Specify the additional parameter Names and Values in the table.

For example, if you are connecting to a third party JMS provider you can enter the client ID and its corresponding value for each channel. However, these arespecific to the third party provider.

For more information refer to the documentation of the third party provider.

ExampleBelow is a typical procedure for handling pending messages: 1. The default setting for the parameter of the receiver JMS adapter is Throw Exception. 2. You see the following exception in the message or adapter monitor:

The channel is configured to throw a recoverable, temporary error for this warning (default). Decide whether you want to bypass this message. If so, set thePending Handling channel parameter to 'Bypass' and restart the message afterwards.

3. Make sure that no further messages are sent through this communication channel by deactivating the corresponding sender channel. 4. Check whether the message or messages have arrived in the JMS environment. a. If the message has arrived in the JMS environment, select Mark Message as Delivered (Message Loss Possible). b. If the message has not arrived in the JMS environment, select Bypass Pending Warning and Send Message to JMS (Duplicates Possible). c. Choose Repeat in message monitoring.If some messages have arrived in the JMS environment and some have not, you must perform the procedure twice and resend the respective messages in eachcase. 5. Reset the parameter in the communication channel to Throw Exception. 6. Activate the corresponding sender communication channel.

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 8 of 11

Page 9: Configuring the JMS Adapter

Defining SonicMQ JMS Provider Settings

UseMake specifications for the JMS provider SonicMQ.

Prerequisites● You are configuring a JMS adapter.

● The default values on the interface relate to SonicMQ 3.0.

Procedure 1. Enter the Topic/QueueConnectionFactory Java Class.

This is the SonicMQ implementation of the Topic/QueueConnectionFactory.

The adapter uses a Topic/QueueConnectionFactory object to generate Topic/QueueConnection objects of a JMS provider.

2. Enter the Queue/Topic Java Class.

A queue object encapsulates a provider-specific queue name. This enables a client to make the queue JMS API methods known.

3. Enter the IP Address or Server Name of the machine on which the JMS provider is running.

If this is a local machine, the value is localhost.

4. Specify the Server Port. 5. Enter the name of theJMS Queue/Topic.

Defining WebSphereMQ (MQ Series) JMS Provider Settings

UseMake specifications for the JMS provider WebSphereMQ (MQ Series).

Prerequisites● You are configuring a JMS adapter.

● The default values on the interface relate to WebSphereMQ 5.3.

Procedure 1. Enter the Topic/QueueConnectionFactory Java Class.

This is the WebSphereMQ implementation of the Topic/QueueConnectionFactory.

The adapter uses a Topic/QueueConnectionFactory object to generate Topic/QueueConnection objects of the JMS provider.

2. Enter the Queue/Topic Java Class.

A queue object encapsulates a provider-specific queue name. This enables a client to make the queue JMS API methods known.

3. Enter the IP Address or Server Name of the machine on which the JMS provider is running.

If this is a local machine, the value is localhost.

4. Specify the Server Port. 5. Under Queue Manager Name, enter the display name of the queue manager. 6. Under Channel Name, specify the access channel for all queues. 7. Enter the name of theJMS Queue/Topic. 8. Under Character Set ID (CCSID) for Non-ASCII Names, specify the character set for the names specified above.

This entry does not affect the character set of the transferred messages.

9. Select the Transport/Network Protocol:○ TCP/IPThe JMS adapter communicates with the MQ Series server using TCP/IP sockets.○ WebSphereMQCommunication takes place using dynamic libraries. For example, Microsoft uses files with the ending .DLL; Unix uses files with the ending .SO or .SL.In a 64-bit operating system, the libraries must also be 64 bit.

If the libraries in a 64-bit operating system are not 64 bit, see SAP Note 790963.

10. Under Target Client, select one of the following:○ WebSphereMQ (Non-JMS)The receiver uses the WebSphereMQ API.

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 9 of 11

Page 10: Configuring the JMS Adapter

○ JMS-CompliantThe receiver uses the JMS API.

Defining JMS Provider Settings for JNDI Access

UseYou use these settings to use the SAP JMS provider. The default values are set in such a way that you can use the AS Java JMS provider without anyadaptation.

For information about changing the default values, see SAP Note 802754.

PrerequisitesYou are configuring a JMS adapter.

Procedure 1. Enter the JNDI Lookup Name of Topic/QueueConnectionFactory.

The adapter uses a Topic/QueueConnectionFactory object to generate Topic/QueueConnection objects of a JMS provider.

2. Enter the JNDI Lookup Name of JMS Queue/Topic.

A queue object encapsulates a provider-specific queue name. This enables a client to make the queue JMS API methods known.

3. Enter the Name of JNDI Initial Context Factory.

This allows access to JNDI. If you want to use another registry, specify it here.

4. Enter the JNDI Server Address.

If you are using the AS Java JMS provider, <host>:<port> is sufficient.

If, for example, you are using OpenJMS, enter http://<host>:<port>/.

5. Enter the JNDI Logon User and JNDI Logon Password, and confirm.

Specifying Files for Administrable Objects of the JMS Provider

UseA JMS provider must provide functions for serializing JMS-administrable objects as Java objects in a file. Connection and access parameters are set. You canload existing administrable objects.

Prerequisites● You are configuring a JMS adapter.

● The files must be copied to each cluster server.

Procedure 1. Enter the File Name of Serialized Topic/QueueConnectionFactory Java Object with path. 2. Enter the File Name of Serialized Queue/Topic Java object with path.

Defining Generic Access to the JMS Provider

UseEnter parameters and values for the generic JMS provider in the table.

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 10 of 11

Page 11: Configuring the JMS Adapter

PrerequisitesYou are configuring a JMS adapter.

ExampleFor Websphere MQ, for example, the table contains the following values:

Name Value

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}

Adding Modules in the JMS Adapter

Use● The following modules are in the module processor for configuring the sender adapter:

○ SAP XI JMS Adapter/ConvertJMSMessageToBinary○ SAP XI JMS Adapter/ConvertBinaryToXMBMessage○ CallSapAdapter

The modules are of type Local Enterprise Bean. They must be available.

● The following modules are in the module processor for configuring the receiver adapter:

○ SAP XI JMS Adapter/ConvertMessageToBinary○ SAP XI JMS Adapter/SendBinarytoXIJMSService

The modules are of type Local Enterprise Bean. They must be available.

Procedure

Adding Your Own Modules in the Sender Adapter 1. Insert your own modules before the CallSapAdapter module.

Adding Your Own Modules in the Receiver Adapter 2. Insert your own modules before the ConvertMessageToBinary module. 3. You can set the following parameters for the module SendBinarytoXIJMSService:○ modulePoolAdminLookupName with value Name of XI JMS Service in JNDI/XIJMSService○ JMSMessageType with the value Text, bytes

As of 710 SP 6, an additional and recommended method of setting the JMS Message Type is to add the following parameter name in the AdditionalParameters table under the Advanced tab.

JMS.Message.type with the value Text, bytes

PUBLIC© 2013 SAP AG or an SAP affiliate company. All rights reserved.

Page 11 of 11