2 Replies Latest reply: Jul 5, 2012 3:09 PM by 947482 RSS

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

    947482
      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