Integrating SAP MII with 3rd party JMS providers
Integrating SAP MII with 3rd party JMS providers: SAP MII has the capability to connect to a number of JMS providers. The below blog post focuses on steps to connect to ActiveMQ JMS server. However, the steps to connect to any JMS provider remain the same.
Setup ActiveMQ server
The steps to set up the server are documented on the URL::
After the setup completes the user needs to create a queue to which he needs to send messages using MII JMS action block. The following details are required to configure JMS connection factory at Netweaver level:
1) Hostname(or IP) and port at which ActiveMQ JMS server is deloyed. The default port for ActiveMQ server is 61616.
2) The credentials to connect to the server. The default user id and password are admin.
Setup JMS Connection Factory at J2EE engine
- The first step to configuring a JMS connection factory is to deploy the client libraries required to connect to the JMS server. A list of the jar files required by any client to connect to the JMS server should be available in the JMS server documentation. For ActiveMQ server it is activemq-all.jar which comes with all libraries required.
In order to deploy the libraries navigate to SAP MMC -> Java Application Server -> AS Java Process Table -> icm node
Right Click and select Java AS Java Telnet. The java console comes up which requires Administrator access for login. Once logged in the user needs to deploy the third party JMS jars. For this run the command:
> ADD JMSCONNECTOR
If the above command fails try changing the location of the jar files.
The status of the libraries can be checked under Java Class Loader Viewer.
2. Once the library jars are deployed the user needs to configure JMS Connection Factory Reference. For this navigate to:
NWA -> Configuration -> Infrastructure -> Application Resources.
3. Select New -> JMS Connection Factory Reference
4. Fill the details as shown the image below:
Library name should be the same as the one specified in (1) above.
5. Save the Factory Reference
6. Few additional properties need to be specified. This can be done by clicking “Add New Property” button at the end of the page. The additional properties are shown below:
The java.naming.factory.initial in case of ActiveMQ server is org.apache.activemq.jndi.ActiveMQInitialContextFactory.The format of specifying java.naming.provider.URL is tcp://: for the system on which ActiveMQ server is deployed.The default value of port is 61616.
7. Save the Resource. The status of the resource should be green.
8. Navigate to JNDI Browser in NWA.
9. The entry for path to ActiveMQResourceApplication should be visible as shown in the image below:
The path to the connection factory is jms_vendor_factory_local/sap.com/ActiveMQResourceApplication/AMQConnectionFactory.
1) Login to MII. Navigate to Data Services – > Connections
2) Create a new JMS connection of type JMS.
3) Fill in the details like Name, Server URL, JNDI Context Provider and JNDI Factory Context like image shown below. Note that the JNDI factory context will be the path noted above.
The check-box, “Skip JNDI lookup” has been introduced so that the user can specify whether the Queue(or rather the JMS server) being used exists on the same java application server. In case a separate ActiveMQ has been setup, the box should be checked.
4) Once the configurations are complete, the transaction can be run to send the JMS message to the specified queue.
Would you like to access Full Article?
If you are already a member in this website, Please Click here to loginIf you are not yet a member, Please Click here to Sign up
New NetWeaver Information at SAP.com