Skip to Content

PI and SAP application server as JMS provider


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.


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.


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).


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


Note that the port to be used will be 5+

You must be Logged on to comment or reply to a post.
  • 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

    • 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.

  • 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.


  • was anyone able to do this configuration in Hermes using SAP PI 7.5 (AEX)? which libs are needed?


    javax.jms.JMSException: Could not create InitialContext: Cannot instantiate class:
    at hermes.JNDIContextFactory.createContext(
    at hermes.JNDIConnectionFactory.createConnection(
    at hermes.impl.jms.ConnectionManagerSupport.createConnection(
    at hermes.impl.jms.ConnectionSharedManager.reconnect(
    at hermes.impl.jms.ThreadLocalSessionManager.reconnect(
    at hermes.impl.DefaultHermesImpl.reconnect(
    at hermes.impl.DefaultHermesImpl.getDestination(
    at hermes.browser.tasks.BrowseDestinationTask.invoke(