A JMS host represents a Message Queue broker. JMS contains a JMS hosts list (the AddressList property) that contains all the JMS hosts that are used by GlassFish Server. The JMS hosts list is populated with the hosts and ports of the specified Message Queue brokers and is updated whenever a JMS host configuration changes. When you create JMS resources or deploy message driven beans, the resources or beans inherit the JMS hosts list.
One of the hosts in the JMS hosts list is designated the default JMS host. GlassFish Server starts the default JMS host when the Message Queue broker mode is configured as type LOCAL.
The following topics are addressed here:
A default JMS host, default_JMS_host, is provided by GlassFish Server. The default JMS host is used by GlassFish Server to perform all Message Queue broker administrative operations, such as creating and deleting JMS destinations.
Creating a new JMS host is not often necessary and is a task for advanced users. Use the create-jms-host subcommand in remote mode to create an additional JMS host.
Because a JMS is actually a Message Queue object rather than a server object, you use Message Queue broker commands to update properties. For information on Message Queue properties, see Oracle GlassFish Message Queue 4.4.2 Administration Guide.
Ensure that the server is running.
Remote subcommands require a running server.
Create the JMS host by using the create-jms-host(1) subcommand.
Information about the properties for this the subcommand is included in this help page.
This example creates a JMS host named MyNewHost.
asadmin> create-jms-host --mqhost pigeon --mqport 7677 MyNewHost Command create-jms-host executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help create-jms-host at the command line.
Use the list-jms-hosts subcommand in remote mode to list the existing JMS hosts.
Ensure that the server is running.
Remote subcommands require a running server.
List the JMS hosts by using the list-jms-hosts(1) subcommand.
The following subcommand lists the existing JMS hosts.
asadmin> list-jms-hosts default_JMS_host MyNewHost Command list-jmsdest executed successfully |
List the JMS hosts by using the list-jms-hosts(1) subcommand.
Use the set(1) subcommand to modify a JMS host.
This example changes the value of the host attribute of the default JMS host. By default this value is localhost.
asadmin> set server-config.jms-service.jms-host.default_JMS_host.host= "archie.india.sun.com" |
You can also view the full syntax and options of the subcommand by typing asadmin help set at the command line.
Use the delete-jms-host subcommand in remote mode to delete a JMS host from the JMS service. If you delete the only JMS host, you will not be able to start the Message Queue broker until you create a new JMS host.
Ensure that the server is running.
Remote subcommands require a running server.
List the JMS hosts by using the list-jms-hosts(1) subcommand.
Delete a JMS host by using the delete-jms-host(1) subcommand.
This example deletes a JMS host named MyNewHost.
asadmin> delete-jms-host MyNewHost Command delete-jms-host executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help delete-jms-host at the command line.