Oracle Fusion Middleware
Oracle WebLogic Server API Reference
12c Release 1 (12.1.1)

Part Number E24391-02

weblogic.jms.extensions
Class JMSDestinationAvailabilityHelper

java.lang.Object
  extended by weblogic.jms.extensions.JMSDestinationAvailabilityHelper

public class JMSDestinationAvailabilityHelper
extends Object

Provides a registration/notification mechanism for WebLogic 9.0 and later distributed destination member availability changes.

This helper can also be used for a regular (non-distributed) destination, a WebLogic pre-9.0 distributed destination, or a third party JMS destination for destination availability information. However, the listeners for such a destination never get per-member notifications, only get an availability notification once, and never get unavailability notifications.

This helper can also be used for a destination that is defined in a Foreign JMS Server configuration. An application provides the local JNDI name in the registration and the listener gets notifications for the availability/unavailability of the remote/final physical destination. The actual support is determined by the remote/final physical destination; if the remote destination is a WebLogic 9.0 and later distributed destination, the listener gets availability as well as unavailability notifications for the members of the remote distributed destination; for all other cases, the listener will only get the initial availability notification and no unavailability or subsequent availability notifications. All the notifications are about the remote destination not the local Foreign JMS Server representations.

Note:

WARNING: This helper is for advanced use cases only. Use this helper only when standard approaches for solving WebLogic distributed consumer problems have been exhausted. One standard approach is to use a WebLogic Server MDB to process messages. A WebLogic MDB that consumes from a WebLogic 9.0 or later distributed destination automatically creates and closes internal consumers across all members. It also handles security, threading, pooling, application life cycle, automatic retry, and transaction enlistment.

Since:
11gR1PS2 (WebLogic 10.3.3)

Method Summary
static JMSDestinationAvailabilityHelper getInstance()
          Get the singleton instance of the JMSDestinationAvailabilityHelper.
 RegistrationHandle register(Hashtable properties, String destJNDIName, DestinationAvailabilityListener listener)
          Register a listener for destination availability updates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JMSDestinationAvailabilityHelper getInstance()
Get the singleton instance of the JMSDestinationAvailabilityHelper.

Returns:
An instance of JMSDestinationAvailabilityHelper.

register

public RegistrationHandle register(Hashtable properties,
                                   String destJNDIName,
                                   DestinationAvailabilityListener listener)
Register a listener for destination availability updates. See DestinationAvailabilityListener interface for information about notifications.

Applications register a notification listener with the helper by specifying JNDI context parameters and the JNDI name of a destination. For WebLogic 9.0 and later Distributed Destinations, the helper notifies listeners when particular members become available and unavailable as destinations are undeployed, added as a new member, migrated, shutdown, or restarted. If the listener is running in the same cluster as the destination, it is preferred not to put URL in the JNDI properties. For a URL that references a remote clustered JNDI name space, it is recommended to use a URL that references all servers in the (cluster. For example: Specify a URL that resolves to a DNS round-robin address, a URL that is resolved by a load balancer, or a WebLogic URL that contains a comma separated list of host addresses.

This helper can also be used for a regular (non-distributed) destination, a WebLogic pre-9.0 distributed destination, or a third party JMS destination for destination availability information. However, the listeners for such a destination never get per member notifications, only get an availability notification once, and never get unavailability notifications.

This helper can also be used for a destination that is defined in a Foreign JMS Server configuration. An application provides the local JNDI name in the registration and the listener gets notifications for the availability/unavailability of the remote/final physical destination. The actual support is determined by the remote/final physical destination; if the remote destination is a WebLogic 9.0 and later distributed destination, the listener gets availability as well as unavailability notifications for the members of the remote distributed destination; for all other cases, the listener will only get the initial availability notification and no unavailability or subsequent availability notifications. All the notifications are about the remote destination not the local Foreign JMS Server representations.

NOTE: Registrations for the JNDI name of a distributed destination member are treated as "regular (non-distributed) destination" registrations. In this case, the destination type in DestinationDetail notifications is either DestinationDetail.DESTINATION_TYPE_PHYSICAL_QUEUE or DestinationDetail.DESTINATION_TYPE_PHYSICAL_TOPIC.

Parameters:
properties - Initial context properties. Pass null if this destination is in the same WebLogic cluster as the caller.
destJNDIName - The JNDI name of the destination.
listener - An instance of DestinationAvailabilityListener.
Returns:
An instance of RegistrationHandle.
See Also:
RegistrationHandle.unregister(), DestinationAvailabilityListener

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
12c Release 1 (12.1.1)

Part Number E24391-02