Skip to Content

SAP JMS Provider Management Console

With all of the hype surrounding Web services these days, you don’t hear much about message-oriented middleware (MOM) anymore. This is a shame, because messaging solutions really do have a lot to offer in terms of reliability and scalability. But that’s another lesson for another day.

Assuming you’ve already bought into all that MOM has to offer, then you’re probably at least familiar with the Java™ Message Service (JMS) on some level. JMS is a vendor-neutral API that can be used to interact with messaging systems. As a Java™ developer, this means that you can write a piece of code to interact with IBM’s WebSphere MQ and then turn around and use that same piece of code to process messages on SAP’s JMS provider. This is analogous to the use of other generic APIs such as JDBC, JavaMail, and JNDI.

While the JMS API defines rich semantics for processing messages, it doesn’t have a lot to say about how to carry out certain administrative tasks. Frequently, these operations are performed using proprietary extensions and/or JMX MBeans. But what if you just want a simple administrative console to perform simple operations like browsing a queue, adding messages/removing messages, and so on?

Coming up with a solution for this has been something I’ve been playing around with off and on for quite some time. After giving the open-source HermesJMS tool an extended look, I ultimately decided that I needed something a little more specialized for what I was trying to accomplish. In this blog, I will present a custom Web Dynpro-based management tool that can be used to perform simple administrative tasks on the default SAP JMS provider.

The Solution

The solution was developed using Web Dynpro for Java on an SAP NetWeaver AS Java 7.1 stack. The core functionality is implemented exclusively using the JMS and JNDI APIs, so no proprietary extensions are required to install this solution. The following figure shows the main selection screen area where you can search for JMS queues that you wish to manage. The results table allows you to view messages, create sample messages, and remove messages.


Searching for Queues

If you can’t remember the name of the queue you want to manage, you can browse to it using the advanced search capabilities built into the tool. This search help lets you search for queues using regular expression syntax (see the figure below).


Creating Messages

You can click on the Create button to create a new message. Here, you will be prompted with an input mask that allows you to create a TextMessage. This could include a sample XML snippet, or some other text payload of your choosing. As the source code is provided, you could conceivably develop support for other message type as necessary.


Viewing Messages

You can view a JMS message by selecting it in the table and clicking on the View Message button. The figure below shows what the screen looks like. In addition to the JMS message ID and timestamp, you can also see custom header properties that were added to the message.

Viewing a JMS Message

Removing Messages

To remove a message, simply select it in the table and click on the Remove Message button. One thing to keep in mind here is that this function will only work if there are no registered listeners (e.g. MDBs, and so on) on the queue in question; otherwise the operation will fail. This is because JMS does not provide API methods for removing messages. Therefore, the only portable way of achieving this is to create an ad hoc consumer that uses message selectors to filter on the selected message IDs.

Purging the Queue

You can think of the Purge Queue button as a mass deletion operation that is designed to remove all messages from the queue. This function is also subject to the same constraints as the Remove Message function.


As you can imagine, many of these operations are powerful and must be secured against novice users who could potentially wreak havoc on the system. To guard against this, a series of UME actions were defined to protect access to the more sensitive functions. The figure below shows the creation of a sample UME role called JMSAdministrator that contains these actions. You can mix and match these actions in different roles as needed.


Where can I go to get it?

The final solution is bundled as an SCA archive and available for download here. I hope that this will be of some use to you, and thanks for reading.

You must be Logged on to comment or reply to a post.
  • An admin tool for SAP JMS queues from a SAP PI perspective is something is sorely missed by the SAP PI developers.

    I have an additional problem at a customer when trying to communicate between SAP PI & BEA Weblogic JMS queues. When the BEA server or queues go wonky it still retains the same context for all previously connected SAP JMS Adapters. What this means is that the SAP JMS adapters appear to have re-connected properly (green lights all round) to the BEA JMS queues but in actual fact they haven’t. It is a known issue on the BEA side with a SAP note issued for the fix but that fix doesn’t seem to work at this specific customer.

    So a manual re-start of the SAP JMS adapters has to done to get the adapters polling the BEA queues again but this is a rather re-active process which isn’t ideal for a messaging system that needs to be reliable. I was looking at crafting a similar server side tool but with the added flexibility of external queue monitoring & alerting, maybe creating workflows if messages in a specific queue exceed a certain threshold or something. Just haven’t got around to it yet. Maybe this tool can motivate me to get started 🙂

  • Hi James,

    such a useful tool. And thanks for providing the sources.I was able to modify them to access our own queues in our own JMS providers and I’m not even a programmer. So many kudo’s to you.


  • Very nice tool. Good work!

    I always wondered why SAP doesn’t recognize the gap about that (tools like this are quite common in other app servers….)

    Best wishes

  • Hi James,

    This seems very useful indeed!! But since it has been released in 2010, is this compliant with the latest version of SAP PO (7.4)?

    Did you perform any updates on it? Are you still using this add-on?



    • Hi Julien,

      I haven’t deployed it on a 7.4 environment, but see no reason why you couldn’t. It’s a pretty basic tool utilizing core Java EE APIs to do the heavy lifting. Let me know if you have any issues, but I think you should be good to go.



      • Thanks for your answer James!

        Indeed It works well on a 7.4 environment! I do not understand why this is not available by default…

        Still the tool seems not to be designed for topics because I can only find queues unless there is some special combination I did not get?



  • Hi James,

    thanks for the tool, it might be helpful, but currently I see some issues after succesful deployment on SAP PO 7.5 SP8:

    • Unluckily I’m not able to find the actions in /useradmin


    • For some queues  I receive the error:

      Cannot cast class to interface javax.jms.Queue

    • Other queues I cannot find, e.g. jmsqueues/alertingVP/jms/queue/xi/monitoring/alert/<SAP-PO-Alert-Consumer>

    Just to let others know, the URL to access the app is:

    BTW is there another tool in the meanwhile to check SAP PO queues besides the outdated Hermes?

    Kind regards

    • Johannes,


      You are right . It seems like the tool is only able to browse the queue on the “default” virtual provider. Other queues for instance, “jmsqueues/alertingVP/jms/queue/xi/monitoring/alert/<SAP-PO-Alert-Consumer>” are on under a different virtual provider i.e. “alertingVP” . It would have been great if we were able to browse all queue under different VPs.