The Java EE 6 Tutorial

Changing the Default Host Name

By default, the default host name for the JMS service on the GlassFish Server is localhost. To access the JMS service from another system, however, you must change the host name. You can change it to either the actual host name or to 0.0.0.0.

You can change the default host name using either the Administration Console or the asadmin command.

ProcedureTo Change the Default Host Name Using the Administration Console

  1. On jupiter, start the Administration Console by opening a browser at http://localhost:4848/.

  2. In the navigation tree, expand the Configuration node.

  3. Under the Configuration node, expand the Java Message Service node.

  4. Under the Java Message Service node, expand the JMS Hosts node.

  5. Under the JMS Hosts node, select default_JMS_host.

    The Edit JMS Host page opens.

  6. In the Host field, type the name of the system, or type 0.0.0.0.

  7. Click Save.

  8. Restart the GlassFish Server.

ProcedureTo Change the Default Host Name Using the asadmin Command

  1. Specify a command like one of the following:


    asadmin set server-config.jms-service.jms-host.default_JMS_host.host="0.0.0.0"
    

    asadmin set server-config.jms-service.jms-host.default_JMS_host.host="hostname"
    
  2. Restart the GlassFish Server.