Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Well, kind of.

STOMP stands for Streaming Text Orientated Messaging Protocol.  The protocol itself is described here. The fascinating thing about STOMP is that it is quite in the UNIX tradition of human readable text formats.  It is fairly easy to use it to interface your favourite JMS implementation with your favorite language be it C, C++, Ruby, Perl or even BASH.

Some JMS providers talk natively STOMP.  For all other, the CODEHAUS project has provided StompConnect. I will show you how to interface it with the SAP JMS.

The CLASSPATH variable must include sap.com~tc~exception~impl.jar, sap.com~tc~logging~java~impl.jar, sap.com~tc~je~clientlib~impl.jar and jms.jar which are part of your Netweaver installation. They are to be found under $SERVER_ROOT/j2ee/j2eeclient and $SERVER_ROOT/j2ee/cluster/bin/ext/jms respectively.

The STOMP jars should also be included in the CLASSPATH variable. stompconnect-1.0.jar, commons-logging-1.1.jar come with StompConnect. You can download it here.

At this point you should  know your Netweaver username, the password and the URI where it is listening for connections. Now execute on the console:

java -Djava.naming.factory.initial=com.sap.engine.services.jndi.InitialContextFactoryImpl -Djava.naming.security.principal=$YOUR_USERNAME 
-Djava.naming.security.credentials=$YOUR_PASSWORD
-Djava.naming.provider.url=localhost:56004
org.codehaus.stomp.jms.Main tcp://localhost:9876 jmsfactory/default/ConnectionFactory

We are done. Now telnet to port 9876 on your local mashine and connect using the following sequence (Note that ^@ is the key sequence Control-@):

 

CONNECT
login: YOUR_USERNAME
passcode: YOUR_PASSWORD

^@

You should see the response:

CONNECTED
session:null

Play a bit with it using the protocol desciption on the CODEHAUS web site. It is not point-and-click but it opens a whole new world of possibilities.   Next time I will show you how to interface Ruby-On-Rails with SAP JMS using STOMP :-).

1 Comment