## org.hornetq.api.jms
Class HornetQJMSClient

    java.lang.Object
      org.hornetq.api.jms.HornetQJMSClient

    public class HornetQJMSClient

extends Object

A utility class for creating HornetQ client-side JMS managed resources.

Author:
  Andy Taylor

Method Summary
`static org.hornetq.jms.client.HornetQConnectionFactory` `createConnectionFactoryWithHA(DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType)` Create a HornetQConnectionFactory which will receive cluster topology updates from the cluster as servers leave or join and new backups are appointed or removed.
`static org.hornetq.jms.client.HornetQConnectionFactory` `createConnectionFactoryWithHA(JMSFactoryType jmsFactoryType, TransportConfiguration... initialServers)` Create a HornetQConnectionFactory which will receive cluster topology updates from the cluster as servers leave or join and new backups are appointed or removed.
`static org.hornetq.jms.client.HornetQConnectionFactory` `createConnectionFactoryWithoutHA(DiscoveryGroupConfiguration groupConfiguration, JMSFactoryType jmsFactoryType)` Create a HornetQConnectionFactory which creates session factories from a set of live servers, no HA backup information is propagated to the client The UDP address and port are used to listen for live servers in the cluster

`static org.hornetq.jms.client.HornetQConnectionFactory`

`createConnectionFactoryWithoutHA(JMSFactoryType jmsFactoryType, TransportConfiguration... transportConfigurations)`
Create a HornetQConnectionFactory which creates session factories using a static list of transportConfigurations, the HornetQConnectionFactory is not updated automatically as the cluster topology changes, and no HA backup information is propagated to the client

`static Queue` `createQueue(String name)` Creates a client-side representation of a JMS Queue.
`static Topic` `createTopic(String name)` Creates a client-side representation of a JMS Topic.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createConnectionFactoryWithHA

    public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactoryWithHA(DiscoveryGroupConfiguration groupConfiguration,
                                                                                                JMSFactoryType jmsFactoryType)

  Create a HornetQConnectionFactory which will receive cluster topology updates from the cluster as servers leave or join and new backups are appointed or removed. The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP broadcasts which contain connection information for members of the cluster. The broadcasted connection information is simply used to make an initial connection to the cluster, once that connection is made, up to date cluster topology information is downloaded and automatically updated whenever the cluster topology changes. If the topology includes backup servers that information is also propagated to the client so that it can know which server to failover onto in case of live server failure.

  Parameters:
    `discoveryAddress` - The UDP group address to listen for updates
    `discoveryPort` - the UDP port to listen for updates
  Returns:
    the HornetQConnectionFactory

### createConnectionFactoryWithoutHA

    public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactoryWithoutHA(DiscoveryGroupConfiguration groupConfiguration,
                                                                                                   JMSFactoryType jmsFactoryType)

  Create a HornetQConnectionFactory which creates session factories from a set of live servers, no HA backup information is propagated to the client The UDP address and port are used to listen for live servers in the cluster

  Parameters:
    `discoveryAddress` - The UDP group address to listen for updates
    `discoveryPort` - the UDP port to listen for updates
  Returns:
    the HornetQConnectionFactory

### createConnectionFactoryWithHA

    public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactoryWithHA(JMSFactoryType jmsFactoryType,
                                                                                                TransportConfiguration... initialServers)

  Create a HornetQConnectionFactory which will receive cluster topology updates from the cluster as servers leave or join and new backups are appointed or removed. The initial list of servers supplied in this method is simply to make an initial connection to the cluster, once that connection is made, up to date cluster topology information is downloaded and automatically updated whenever the cluster topology changes. If the topology includes backup servers that information is also propagated to the client so that it can know which server to failover onto in case of live server failure.

  Parameters:
    `initialServers` - The initial set of servers used to make a connection to the cluster. Each one is tried in turn until a successful connection is made. Once a connection is made, the cluster topology is downloaded and the rest of the list is ignored.
  Returns:
    the HornetQConnectionFactory

### createConnectionFactoryWithoutHA

    public static org.hornetq.jms.client.HornetQConnectionFactory createConnectionFactoryWithoutHA(JMSFactoryType jmsFactoryType,
                                                                                                   TransportConfiguration... transportConfigurations)

  Create a HornetQConnectionFactory which creates session factories using a static list of transportConfigurations, the HornetQConnectionFactory is not updated automatically as the cluster topology changes, and no HA backup information is propagated to the client

  Parameters:
    `transportConfigurations` -
  Returns:
    the HornetQConnectionFactory

### createTopic

    public static Topic createTopic(String name)

  Creates a client-side representation of a JMS Topic.

  Parameters:
    `name` - the name of the topic
  Returns:
    The Topic

### createQueue

    public static Queue createQueue(String name)

  Creates a client-side representation of a JMS Queue.

  Parameters:
    `name` - the name of the queue
  Returns:
    The Queue

Copyright © 2009 Red Hat Inc. All Rights Reserved.