Forum Stats

  • 3,855,692 Users
  • 2,264,543 Discussions
  • 7,906,138 Comments

Discussions

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

947482
947482 Member Posts: 2
edited Jul 5, 2012 4:09PM in Java Message Service (JMS)
Hi,

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 default.properties (in my case file D:\usr\Glassfish3\mq\lib\props\broker\default.properties) by adding "httpjms" to imq.service.activelist, so I have:

# List of active services, started at startup
imq.service.activelist=jms,admin,httpjms

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 java.net.SocketPermission "*",
"connect,accept,resolve";

};

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 http://127.0.0.1:8080/imqhttp/tunnel 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 :
ANTEC:imqbroker

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

...uh !!???!! ...it 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.

Later

Varus
Tagged:

Best Answer

  • 800561
    800561 Member Posts: 10
    Answer ✓
    To have the new setting of broker property imq.service.activelist take effect, if EMBEDDED (default) jms-service is used, the GlassFish server needs to be restarted; otherwise, the broker process needs to be restarted. If the JMS service (EMBEDDED mode) in the GlassFish server has not been started (due to GlassFish JMS lazy init - default), run 'asadmin jms-ping' will start the embedded broker in GlassFish server.

Answers

  • 800561
    800561 Member Posts: 10
    Answer ✓
    To have the new setting of broker property imq.service.activelist take effect, if EMBEDDED (default) jms-service is used, the GlassFish server needs to be restarted; otherwise, the broker process needs to be restarted. If the JMS service (EMBEDDED mode) in the GlassFish server has not been started (due to GlassFish JMS lazy init - default), run 'asadmin jms-ping' will start the embedded broker in GlassFish server.
  • 947482
    947482 Member Posts: 2
    ak,

    thank you so much!!

    Once again today the broker was not listed...

    I then did the ping as you suggested, and voilà, it was all working again.

    Varus
This discussion has been closed.