Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide

- Previous: Admin Console Tasks for JMS Physical Destinations
- Next: Chapter 5 Configuring JavaMail Resources

# Admin Console Tasks for the JMS Provider

- To configure general properties for the JMS provider

- To create a JMS host

- To edit a JMS host

- To delete a JMS host

## To configure general properties for the JMS provider

Use the JMS Service page to configure properties to be used by all JMS connections.

For more information about configuring the JMS service, see the Application Server Developer’s Guide.

1. In the tree component, select the Configurations node.

2. Select the instance to configure:

   - To configure a particular instance, select the instance’s config node. For example, for the default instance, `server`, select the `server-config` node.

   - To configure the default settings for future instances that use a copy of `default-config`, select the `default-config` node.

3. Select the Java Message Service node to open the JMS Service page.

4. Edit the value in the Startup Timeout field to change the time the Application Server waits for the JMS service to start before aborting the startup.

   On a slow or overloaded system, increase the value from the default (60).

5. From the Type drop-down list:

   - Choose `LOCAL` (the default for the `server-config` configuration) to access the JMS service on the local host. The JMS service is started and managed by the Application Server.

   - Choose `REMOTE` (the default for the `default-config` configuration) to access the JMS service on another system or on a cluster. If you choose `REMOTE`, the JMS service is not started by the Application Server the next time the server starts. Instead, the JMS service is started and managed via Message Queue, so you must start the Message Queue broker separately. For information about starting the broker, see the Message Queue Administration Guide. If you choose this value and are using a remote host, follow the instructions in To edit a JMS host to specify the name of the remote host.

6. In the Start Arguments field, type arguments to customize the JMS service startup.

   Use any arguments available through the MQ-install-dir`/imq/bin/imqbrokerd` command.

7. Use the Reconnect checkbox to specify whether the JMS service attempts to reconnect to a message server (or the list of addresses in the AddressList) when a connection is lost.

   By default, reconnection is enabled.

8. In the Reconnect Interval field, type the number of seconds between reconnect attempts.

   This applies for attempts on each address in the AddressList and for successive addresses in the list. If it is too short, this time interval does not give a broker time to recover. If it is too long, the reconnect might represent an unacceptable delay.

   The default value is 60 seconds.

9. In the Reconnect Attempts field, type the number of attempts to connect (or reconnect) for each address in the AddressList before the client runtime tries the next address in the list.

   A value of -1 indicates that the number of reconnect attempts is unlimited (the client runtime attempts to connect to the first address until it succeeds). The default value is 3.

10. Choose a host from the Default JMS Host drop-down list. The default is `default_JMS_host`.

11. In the Address List Behavior drop-down list, choose whether connection attempts are in the order of addresses in the AddressList (`priority`) or in a random order (`random`).

    `priority` means that the reconnect always tries to connect to the first server address in the AddressList and uses another one only if the first broker is not available.

    If there are many clients attempting a connection using the same connection factory, specify `random` to prevent them from all being connected to the same address.

    The default is `random`.

12. In the Address List Iterations field, type the number of times the JMS service iterates through the AddressList in an effort to establish (or reestablish) a connection).

    A value of -1 indicates that the number of attempts is unlimited.

    The default value is 3.

13. In the MQ Scheme and MQ Service fields, type the Message Queue address scheme name and the Message Queue connection service name if a non-default scheme or service is to be used.

    The full syntax for a message service address is

        scheme://address-syntax

    where the scheme and address-syntax are described in the table below.

    The MQ Scheme and MQ Service are the values shown in the first two columns of the following table.

    Scheme Name | Connection Service | Description | Address Syntax
    --- | --- | --- | ---
    `mq` | `jms` and `ssljms` | Message Queue client runtime makes a connection to the MQ Port Mapper at the specified host and port. The Port Mapper returns a list of the dynamically established connection service ports, and the Message Queue client runtime then makes a connection to the port hosting the specified connection service. | `[`hostName`][:`port`][/`serviceName`]` Defaults: hostName = `localhost`, port = `7676`, serviceName = `jms` Defaults only apply to the `jms` connection service. For the `ssljms` connection service, all variables need to be specified. Example: `mq:MyHost:7677/ssljms`
    `mqtcp` | `jms` | Message Queue client runtime makes a TCP connection to the specified host and port (bypassing the MQ Port Mapper) to establish a connection. | hostName`:`port`/jms` Example: `mqtcp:localhost:7676/jms`
    `mqssl` | `ssljms` | Message Queue client runtime makes a secure SSL connection to the specified host and port (bypassing the MQ Port Mapper) to establish a connection. | hostName`:`port`/ssljms` Example: `mqssl:localhost:7676/ssljms`
    `http` | `httpjms` | Message Queue client runtime makes an HTTP connection to an Message Queue tunnel servlet at the specified URL. (The broker must be configured to access the HTTP tunnel servlet, as described in the Message Queue Administrator’s Guide.) | hostName`:`port`/`contextRoot`/tunnel` If multiple broker instances are using the same tunnel servlet, then the syntax for connecting to a specific broker instance (rather than a randomly selected one) is: `http://`hostName`:`port`/`contextRoot`/tunnel?`serverName`=`hostName`:`instanceName
    `https` | `httpsjms` | Message Queue client runtime makes a secure HTTPS connection to the specified Message Queue tunnel servlet URL. (The broker must be configured to access the HTTPS tunnel servlet, as described in the Message Queue Administrator’s Guide.) | hostName`:`port`/`contextRoot`/tunnel` If multiple broker instances are using the same tunnel servlet, then the syntax for connecting to a specific broker instance (rather than a randomly selected one) is: `http://`hostName`:`port`/`contextRoot`/tunnel?`serverName`=`hostName`:`instanceName

14. In the Additional Properties area, click Add Property to add a property.

    The following table lists the available Sun Java System Message Queue broker configuration properties.

    Property Name | Description
    --- | ---
    `instance-name` | Specifies the full Message Queue broker instance name. The default is `imqbroker`.
    `instance-name-suffix` | Specifies a suffix to add to the full Message Queue broker instance name. The suffix is separated from the instance name by an underscore character (`_`). For example, if the instance name is `imqbroker`, appending the suffix `xyz` changes the instance name to `imqbroker_xyz`.
    `append-version` | If `true`, appends the major and minor version numbers, preceded by underscore characters (`_`), to the full Message Queue broker instance name. For example, if the instance name is `imqbroker`, appending the version numbers changes the instance name to `imqbroker_8_0`. The default is `false`.

15. Click Save to save the changes, or click Load Defaults to restore the default values for the service.

##### Accessing Remote Servers

Changing the provider and host to a remote system causes all JMS applications to run on the remote server. To use both the local server and one or more remote servers, create a connection factory resource with the `AddressList` property to create connections that access remote servers. See To create a JMS connection factory resource.

## To verify JMS Service settings

1. In the tree component, select the Configurations node.

2. Select the instance to configure:

   - To configure a particular instance, select the instance’s config node. For example, for the default instance, `server`, select the `server-config` node.

   - To configure the default settings for future instances that use a copy of `default-config`, select the `default-config` node.

3. Select the Java Message Service node to open the JMS Service page.

4. Click Ping.

   If the JMS service is up and running, the message “Ping succeeded: JMS service is running” appears.

##### Equivalent asadmin command

`jms-ping`

## To create a JMS host

The Application Server Platform Edition expects there to be exactly one JMS host, whose default name is `default_JMS_host`. It is possible to create additional hosts, but the Application Serverhas no way of knowing about them.

1. In the tree component, expand the Configurations node.

2. Select the instance to configure:

   - To configure a particular instance, select the instance’s config node. For example, for the default instance, `server`, select the `server-config` node.

   - To configure the default settings for future instances that use a copy of `default-config`, select the `default-config` node.

3. Expand the Java Message Service node.

4. Select the JMS Hosts node.

5. On the JMS Hosts page, click New. The Create JMS Host page appears.

6. In the Name field, type the name of the host. For example:

       NewJmsHost

7. In the Host field, type the name or Internet Protocol (IP) address of the system where the JMS host will run (`localhost` or the name of the local or remote system).

8. In the Port field, type the port number of the JMS service.

   Change this field only if the JMS service to be used is running on a non-default port. (The default port is 7676.)

9. In the Admin Username and Admin Password fields, type the Message Queue broker user name and password.

   These are different from the Application Server user name and password. Edit these fields only if the Message Queue broker values have been changed using the MQ-install-dir`/imq/bin/imqusermgr` command. The default values are `admin` and `admin`.

10. Click OK.

##### Equivalent asadmin command

`create-jms-host`

## To edit a JMS host

1. In the tree component, expand the Configurations node.

2. Select the instance to configure:

   - To configure a particular instance, select the instance’s config node. For example, for the default instance, `server`, select the `server-config` node.

   - To configure the default settings for future instances that use a copy of `default-config`, select the `default-config` node.

3. Expand the Java Message Service node.

4. Select the JMS Hosts node.

5. On the JMS Hosts page, select the host to be edited.

6. On the Edit JMS Host page, it is possible to perform these tasks:

   - Change the host name or Internet Protocol (IP) address in the Host field.

     - Change the port number of the JMS service in the Port field.

     - Change the values in the Admin Username and Admin Password fields.

7. Click Save to save the changes, or click Load Defaults to restore the default values for the host.

## To delete a JMS host

1. In the tree component, expand the Configurations node.

2. Select the instance to configure:

   - To configure a particular instance, select the instance’s config node. For example, for the default instance, `server`, select the `server-config` node.

   - To configure the default settings for future instances that use a copy of `default-config`, select the `default-config` node.

3. Expand the Java Message Service node.

4. Select the JMS Hosts node.

5. On the JMS Hosts page, select the checkbox next to the name of the host to be deleted.

6. Click Delete.

   Caution –

   Do not delete all JMS hosts. Doing so will prevent Application Server from restarting. You must leave at least one JMS host.

##### Equivalent asadmin command

`delete-jms-host`

- Previous: Admin Console Tasks for JMS Physical Destinations
- Next: Chapter 5 Configuring JavaMail Resources

- © 2010, Oracle Corporation and/or its affiliates