Sun GlassFish Message Queue 4.4 Administration Guide

ProcedureModifying the Application Server’s Security Policy File

Each Application Server instance has a security policy file specifying its security policies or rules. Unless modified, the default security policies would prevent the HTTP or HTTPS tunnel servlet from accepting connections from the Message Queue message broker. In order for the broker to connect to the tunnel servlet, you must add an additional entry to this policy file:

  1. Open the security policy file.

    The file is named server.policy and resides at a location that varies depending on your operating system platform. On the Solaris platform, for example, the policy file for server jeeves would be located at

       appServerRoot/glassfish/domains/domain1/jeeves/config/server.policy
    

    where appServerRoot is the root directory in which Sun GlassFish Application Server is installed.

  2. Add the following entry to the file:

       grant codeBase
          "file:appServerRoot/glassfish/domains/domain1/jeeves
                      /applications/j2ee-modules/imqhttps/-
             {  
                permission java.net.SocketPermission "*","connect,accept,resolve";
             };
    
  3. Save and close the security policy file.