Skip to Content

Summary

The SAP Web Application Server can be used as a JMS provider. This article describes how to configure PI to access the queues of a SAP WAS and how to use an open source tool called Hermes JMS to post and read messages from these queues.

In a future blog I will tell you how to send messages from message mapping or adapter module to the application server PI itself is running on. This gives you the possibility of asynchronous feedback during your message processing.

Setup the queues for communication

First of all you will have to create the queues you are going to use for communication. You can do that using the Netweaver Administrator. Goto the menu path “Configuration Management”>Infrastructure and choose “JMS Server configuration”. Typically you will need one sender and one response queue. You can create your own queues or use the existing demo queues for simplicity.

image

Configuration of PI

Configuration in PI is pretty much straight forward as you can reuse the default configuration of a newly created JMS communication channel. You only have to adjust queue names host and port information. In our simple example we will just read a message from the sender queue and write it without any changes to the receiver queue. We will use sapDemoQueue for reading with PI and sapDemoQueue2 for writing. Here is how it should look like for you for the sender channel. Receiver channel will have exactly the same configuration with a different queue name.

image

I leave it up to the reader to setup the complete scenario between a sender service and a receiver service without mapping.

Accessing the queues with Hermes JMS

The interesting thing is now how to upload test messages and check that they are processed and delivered correctly to the receiving queue. There is a powerful open source tool called Hermes JMS [3] that will work as a JMS client for a wide range of JMS providers. You can view edit post delete messages, create queues and topics and many more things.

There are different ways to configure Hermes JMS. One is described in [1]. I have used the standard jms client libraries from SAP. It is described in the sap help how to get them, see [2]. This way you will access the JMS Provider with standard JMS API.

First of all I suggest having a look at one of the demo videos on the Hermes JMS web site [3]. If you want to jump start do as follows. Create a new session (Menu Action>New>New session) go to the providers tab and add a classpath group with the client libraries (note that the tabs are shown at the bottom not at the top of the canvas).

image

Press apply and go to the session tab and fill in the connection details

image

Note that the port to be used will be 5+

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Krishnakumar Ramamoorthy
    Are you using this in a productive environment? If yes, do you have some information on the performance. I have stayed away from the JMS service offered by SAP Web AS because it doesn’t have an out of the box monitoring and exception handling tool.
    Of course, we could build one custom but I might as well missed some important piece of the documentation about out of the box functionality.

    Thanks for your blog
    KK

    (0) 
    1. Jochen Damzog Post author
      Hi Krishnakumar,

      first of all: No I do not have any performance figures for WAS as JMS Provider.

      However asynchronous communication of enterprise beans uses JMS hence it is already used in production by PI itself e.g. for cache updates.

      We want to use it for error propagation messages in case of lookup failures using the value mapping feature. As we do not expect high traffic on that I am not to much concerned about performance.

      (0) 
  2. Community User
    Hi,

    Thanks for the excellent post.

    I am evaluating integration options between PI and WMQ. In addition to client connections, I am also looking at options for server-server connection e.g. (PI + Local WMQ) to Central WMQ. However, if the SAP JMS provider service allows posting to remote queues of 3rd party JMS providers, then we can do without the local WMQ server.

    Thoughts???

    (0) 

Leave a Reply