Skip to Main Content

JMS over HTTP, HTTP tunneling, imqhttp, Glassfish, Open MQ

947482Jul 4 2012 — edited Jul 5 2012

I want to run JMS over HTTP, because of firewalls.

My environment:

- Windows 7 64 bits
- Java EE 6 SDK (Glassfish 3, installer java_ee_sdk-6u4-jdk7-windows-x64.exe)

Following instructions (Oracle GlassFish Server Message Queue Administration Guide, HTTP/HTTPS Support), I have done as follows:

1.- modified (in my case file D:\usr\Glassfish3\mq\lib\props\broker\ by adding "httpjms" to imq.service.activelist, so I have:

# List of active services, started at startup

2.- modified server.policy file (in my case D:\usr\Glassfish3\glassfish\domains\domain1\config\server.policy) by adding at the end:

grant codeBase "file:${com.sun.aas.installRoot}/glassfish/domains/domain1/applications/imqhttp/-" {

permission "*",


3.- I then, using the Glassfish Admin Console (listening on port 4848), deployed the application packaged in the imqhttp.war WAR file (this WAR file taken from D:\usr\Glassfish3\mq\lib), using "imqhttp" as Context Root name.

4.- I then invoke URL and get the following return:

HTTP tunneling servlet ready.
Servlet Start Time : Wed Jul 04 19:28:01 CEST 2012
Accepting TCP connections from brokers on port : 7675
Total available brokers = 1
Broker List :

Importantly: I had to reboot everything, including Windows to get the broker listed in the broker list.

...uh !!???!! just shows that posting to discussion groups and sharing is great... yesterday, I could not get this working, I had nothing in my Broker list, and a bunch of exceptions when trying to publish a message... I swear I re-started Glassfish many times... now it's working all right, and the only thing I've done meantime is to reboot the PC...

In any case, I keep the post, it might be of help to someone.


Post Details
Added on Jul 4 2012