Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server 3.1-3.1.1 High Availability Administration Guide |
1. High Availability in GlassFish Server
2. Setting Up SSH for Centralized Administration
3. Administering GlassFish Server Nodes
4. Administering GlassFish Server Clusters
5. Administering GlassFish Server Instances
6. Administering Named Configurations
7. Configuring Web Servers for HTTP Load Balancing
8. Configuring HTTP Load Balancing
9. Upgrading Applications Without Loss of Availability
10. Configuring High Availability Session Persistence and Failover
11. Configuring Java Message Service High Availability
Using Message Queue Broker Clusters With GlassFish Server
About Message Queue Broker Clusters
Configuring GlassFish Clusters to Use Message Queue Broker Clusters
To Change the Master Broker in an Embedded or Local Broker Cluster
To Migrate Between Types of Embedded or Local Conventional Broker Clusters
To Configure a GlassFish Cluster to Use a Local Enhanced Broker Cluster
To Configure a GlassFish Cluster to Use a Remote Broker Cluster
Load-Balanced Delivery to MDBs
This section describes how the JMS service uses Message Queue broker clusters to support high-availability JMS messaging in GlassFish Server clusters. It describes the different cluster and broker types that are supported and how to configure them.
The following topics are addressed here:
Configuring GlassFish Clusters to Use Message Queue Broker Clusters
To Change the Master Broker in an Embedded or Local Broker Cluster
To Migrate Between Types of Embedded or Local Conventional Broker Clusters
To Configure a GlassFish Cluster to Use a Local Enhanced Broker Cluster
To Configure a GlassFish Cluster to Use a Remote Broker Cluster
The following discussion provides a brief overview of Message Queue broker clusters. For complete information, see Chapter 4, Broker Clusters, in Oracle GlassFish Server Message Queue 4.5 Technical Overview.
Message Queue supports two clustering models both of which provide a scalable message service, but with each providing a different level of message service availability:
Conventional broker clusters. A conventional broker cluster provides for service availability. When a broker fails, clients connected to the failed broker reconnect to another broker in the cluster. However, messages and state information stored in the failed broker cannot be recovered until the failed broker is brought back online. The broker failure can therefore result in a significant delay and in JMS message order semantics not being preserved.
Message Queue supports two types of conventional cluster, based on where the cluster configuration change record is stored:
Conventional cluster with master broker. In a conventional cluster with a master broker, one of the brokers, designated as the master broker, stores and maintains the cluster configuration change record. The other brokers in the cluster must communicate with the master broker to keep abreast of changes to the cluster configuration. This is the simplest broker cluster to configure, and is the type of broker cluster that GlassFish Server uses by default to support GlassFish clusters.
Conventional cluster of peer brokers. In a conventional cluster of peer brokers, the cluster configuration change record is stored in a JDBC data store accessible to all the brokers. Thus, brokers can access cluster configuration information whether any other brokers in the cluster are running or not.
Enhanced broker clusters. An enhanced broker cluster provides for data availability in addition to service availability. When a broker fails, another broker takes over the pending work of the failed broker. The failover broker has access to the failed broker's messages and state information. Clients connected to the failed broker reconnect to the failover broker. In an enhanced cluster, as compared to a conventional cluster, messages owned by the failed broker are delivered by the failover broker as soon as it takes over, and JMS message order semantics are preserved.
By its very nature, an enhanced broker cluster is a cluster of peer brokers.
Note - Despite the message service availability offered by both conventional and enhanced broker clusters, they do not provide a guarantee against failure and the possibility that certain failures, for example in the middle of a transaction, could require that some operations be repeated. It is the responsibility of the messaging application (both producers and consumers) to respond to JMS exceptions appropriately. For information about the kinds of exceptions that can occur and how to respond to them, see Handling Exceptions When Failover Occurs in Oracle GlassFish Server Message Queue 4.5 Developer’s Guide for Java Clients.
When a GlassFish Server cluster is created, the JMS service automatically configures a Message Queue conventional broker cluster with master broker for the cluster, provided that the JMS host type in the GlassFish Server cluster's configuration is Embedded or Local. The JMS service configures one Message Queue broker for each instance in the GlassFish Server cluster, and designates as master broker the broker associated with the first instance created in the cluster. In the case of Local JMS hosts, the JMS service configures each broker to run on the same host as the instance with which it is associated. In the case of Embedded JMS hosts, the each broker inherently runs on the same host as the instance with which it is associated because it runs in the same JVM as the instance.
The JMS service manages the lifecycle of Embedded and Local JMS hosts, and this management extends to the management of Message Queue broker clusters as Embedded and Local JMS hosts. For a GlassFish cluster whose configuration specifies Embedded or Local JMS host type, the JMS service:
Creates and manages one Message Queue broker for each instance in the GlassFish cluster, using this broker as the primary JMS host for the instance.
Maintains the JMS host list for each instance in the GlassFish cluster such that its primary JMS host appears first in its JMS host list.
The JMS service supports the following types of Message Queue broker clusters with GlassFish Server clusters, based on the JMS host type:
Conventional broker cluster with master broker (default)
Conventional broker cluster of peer brokers
Conventional broker cluster with master broker (default)
Conventional broker cluster of peer brokers
Enhanced broker cluster
Conventional broker cluster with master broker; brokers can differ in number from GlassFish instances and can be located on other hosts
Conventional broker cluster of peer brokers; brokers can differ in number from GlassFish instances and can be located on other hosts
Enhanced broker cluster; brokers can differ in number from GlassFish instances and can be located on other hosts
The following topics provide instructions for configuring broker clusters in all these contexts.
Use the configure-jms-cluster subcommand in remote asadmin mode to configure a conventional broker cluster with master broker to service a GlassFish Server cluster that uses either Embedded or Local JMS hosts.
Note that this configuration, with Embedded brokers, is the default for GlassFish Server clusters.
Before You Begin
Perform the following steps after you have created the GlassFish Server cluster, but before you have added instances to the cluster or started the cluster.
Caution - Before using this procedure to reconfigure an existing cluster, you must follow the special procedures to migrate to another type of broker cluster, as described in To Migrate Between Types of Embedded or Local Conventional Broker Clusters. Failing to perform these special procedures could lead to data loss or corruption and even render your setup unusable, depending on the JMS operations performed on the existing cluster. |
Remote asadmin subcommands require a running server.
> asadmin configure-jms-cluster --clustertype=conventional --configstoretype=masterbroker glassfish-cluster-name
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help configure-jms-cluster at the command line.
Use the configure-jms-cluster subcommand in remote asadmin mode to configure a conventional broker cluster of peer brokers to service a GlassFish Server cluster that uses Embedded or Local JMS hosts.
Before You Begin
Perform the following steps after you have created the GlassFish Server cluster, but before you have added instances to the cluster or started the cluster.
Caution - Before using this procedure to reconfigure an existing cluster, you must follow the special procedures to migrate to another type of broker cluster, as described in To Migrate Between Types of Embedded or Local Conventional Broker Clusters. Failing to perform these special procedures could lead to data loss or corruption and even render your setup unusable, depending on the JMS operations performed on the existing cluster. |
Remote asadmin subcommands require a running server.
For information about password file entries, see the asadmin(1M) command.
> asadmin --passwordfile password-file configure-jms-cluster --clustertype=conventional --configstoretype=shareddb --dbvendor database-vendor-name --dbuser database-user-name --dburl database-url --property list-of-database-specific-properties glassfish-cluster-name
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help configure-jms-cluster at the command line.
Use the change-master-broker subcommand in remote asadmin mode to change the master broker to a different broker in a conventional broker cluster with master broker serving a GlassFish Server cluster that uses Embedded or Local JMS hosts.
Follow this procedure, for example, before you remove from a GlassFish cluster the instance associated with the current master broker.
Before You Begin
Although not an absolute requirement, you should make sure all GlassFish instances and Message Queue brokers in the cluster are running before using the change-master-broker command in order to avoid later internal configuration synchronization of any unavailable instance or broker.
Remote asadmin subcommands require a running server.
> asadmin change-master-broker glassfish-clustered-instance-name
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help change-master-broker at the command line.
Use the configure-jms-cluster subcommand in remote asadmin mode to configure an enhanced broker cluster to service a GlassFish Server cluster that uses Local JMS hosts.
Before You Begin
Perform the following steps after you have created the GlassFish Server cluster, but before you have added instances to the cluster or started the cluster.
Caution - Before using this procedure to reconfigure an existing cluster, you must follow the special procedures to migrate from a conventional broker cluster to an enhanced broker cluster, as described in Converting a Conventional Cluster to an Enhanced Cluster in Oracle GlassFish Server Message Queue 4.5 Administration Guide. Failing to perform these special procedures could lead to data loss or corruption and even render your setup unusable, depending on the JMS operations performed on the existing cluster. |
Remote asadmin subcommands require a running server.
For information about password file entries, see the asadmin(1M) command.
> asadmin --passwordfile password-file configure-jms-cluster --clustertype=enhanced --configstoretype=shareddb --messagestoretype=jdbc --dbvendor database-vendor-name --dbuser database-user-name --dburl database-url --property list-of-database-specific-properties glassfish-cluster-name
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help configure-jms-cluster at the command line.
Before You Begin
Perform the following steps after you have:
Used Message Queue to create a broker cluster.
Created the GlassFish Server cluster, but not yet created instances for the cluster.
The remote subcommands used in this procedure require a running server.
> asadmin delete-jms-host --target glassfish-cluster-name default_JMS_host
For each broker, use an asadmin create-jms-host of the form:
> asadmin create-jms-host --target glassfish-cluster-name --mqhost broker-host --mqport broker-port --mquser mq-user --mqpassword mq-user-password jms-host-name-for-broker
.