BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.management.configuration
Interface MessagingBridgeMBean


public interface MessagingBridgeMBean
extends DeploymentMBean

This class represents a messaging bridge, which enables you to configure a forwarding mechanism between any two messaging products—thereby, providing interoperability between separate implementations of WebLogic JMS or between WebLogic JMS and another messaging product.

For WebLogic JMS and third-party JMS products, a messaging bridge communicates with a configured source and target destinations using the resource adapters provided with WebLogic Server. For non-JMS messaging products, a customized adapter must be provided by a third-party OEM vendor to access non-JMS source or target destinations.

Author:
Copyright © 2001 BEA Systems, Inc. All Rights Reserved.

Field Summary
static java.lang.String BRIDGE_POLICY_AUTO
           
static java.lang.String BRIDGE_POLICY_MANUAL
           
static java.lang.String BRIDGE_POLICY_SCHEDULED
           
static java.lang.String BRIDGE_QOS_ATMOST_ONCE
           
static java.lang.String BRIDGE_QOS_DUPLICATE_OKAY
           
static java.lang.String BRIDGE_QOS_EXACTLY_ONCE
           
static long CACHING_STUB_SVUID
           
 
Fields inherited from class weblogic.management.configuration.DeploymentMBean
DEFAULT_ORDER, MAX_ORDER, MIN_ORDER
 
Method Summary
 long getBatchInterval()
          Defines the maximum time, in milliseconds, that the bridge will wait before sending a batch of messages in one transaction, regardless of whether the Batch Size amount has been reached or not.
 int getBatchSize()
          Specifies the number of messages that are processed within one transaction.
 int getIdleTimeMaximum()
          Defines the maximum amount of idle time, in seconds, for the messaging bridge.
 java.lang.String getQualityOfService()
          Defines one of the following QOS (quality of service) values for the messaging bridge:
 int getReconnectDelayIncrease()
          Defines an incremental delay time, in milliseconds, that the messaging bridge will wait longer between one failed reconnection attempt and the next retry.
 int getReconnectDelayMaximum()
          Defines the longest time, in seconds, that the messaging bridge will wait between one failed attempt to reconnect to the source or target and the next retry.
 int getReconnectDelayMinimum()
          Defines the minimum amount of time, in seconds, that the messaging bridge will wait before it tries to reconnect to the source or target destination after a failure.
 java.lang.String getSelector()
          Defines the message selector for the messaging bridge.
 BridgeDestinationCommonMBean getSourceDestination()
          Defines the source destination for the messaging bridge.
 BridgeDestinationCommonMBean getTargetDestination()
          Defines the target destination for the messaging bridge.
 int getTransactionTimeout()
          Defines the amount of time, in seconds, that the transaction manager will wait for each transaction before timing it out.
 boolean isAsyncEnabled()
          Indicates whether or not the messaging bridge will work in asynchronous messaging mode.
 boolean isDurabilityEnabled()
          Indicates whether or not the messaging bridge allows durable messages.
 boolean isQOSDegradationAllowed()
          Indicates whether or not the bridge allows the degradation of its QOS when the configured QOS is not available.
 boolean isStarted()
          Defines the initial state of the messaging bridge (that is, the state when the bridge boots).
 void setAsyncEnabled(boolean asyncEnabled)
          Indicates whether or not the messaging bridge will work in asynchronous messaging mode.
 void setBatchInterval(long interval)
          Defines the maximum time, in milliseconds, that the bridge will wait before sending a batch of messages in one transaction, regardless of whether the Batch Size amount has been reached or not.
 void setBatchSize(int size)
          Specifies the number of messages that are processed within one transaction.
 void setDurabilityEnabled(boolean durable)
          Defines whether or not the messaging bridge allows durable messages.
 void setIdleTimeMaximum(int time)
          Defines the maximum amount of idle time, in seconds, for the messaging bridge.
 void setQOSDegradationAllowed(boolean degradationAllowed)
          Indicates whether or not the bridge allows the degradation of its QOS when the configured QOS is not available.
 void setQualityOfService(java.lang.String qos)
          Defines one of the following QOS (quality of service) values for the messaging bridge:
 void setReconnectDelayIncrease(int time)
          Defines an incremental delay time, in milliseconds, that the messaging bridge will wait longer between one failed reconnection attempt and the next retry.
 void setReconnectDelayMaximum(int time)
          Defines the longest time, in seconds, that the messaging bridge will wait between one failed attempt to reconnect to the source or target and the next retry.
 void setReconnectDelayMinimum(int time)
          Defines the minimum amount of time, in seconds, that the messaging bridge will wait before it tries to reconnect to the source or target destination after a failure.
 void setSelector(java.lang.String selector)
          Defines the message selector for the messaging bridge.
 void setSourceDestination(BridgeDestinationCommonMBean sourceDestination)
          Defines the source destination for the messaging bridge.
 void setStarted(boolean started)
          Defines the initial state of the messaging bridge (that is, the state when the bridge boots).
 void setTargetDestination(BridgeDestinationCommonMBean targetDestination)
          Defines the target destination for the messaging bridge.
 void setTransactionTimeout(int timeout)
          Defines the amount of time, in seconds, that the transaction manager will wait for each transaction before timing it out.
 
Methods inherited from interface weblogic.management.configuration.DeploymentMBean
addTarget, getDeploymentOrder, getTargets, removeTarget, setDeploymentOrder, setTargets
 
Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
getNotes, setNotes, setPersistenceEnabled
 
Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setName, setParent
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Field Detail

CACHING_STUB_SVUID

public static final long CACHING_STUB_SVUID

BRIDGE_POLICY_AUTO

public static final java.lang.String BRIDGE_POLICY_AUTO

BRIDGE_POLICY_MANUAL

public static final java.lang.String BRIDGE_POLICY_MANUAL

BRIDGE_POLICY_SCHEDULED

public static final java.lang.String BRIDGE_POLICY_SCHEDULED

BRIDGE_QOS_EXACTLY_ONCE

public static final java.lang.String BRIDGE_QOS_EXACTLY_ONCE

BRIDGE_QOS_ATMOST_ONCE

public static final java.lang.String BRIDGE_QOS_ATMOST_ONCE

BRIDGE_QOS_DUPLICATE_OKAY

public static final java.lang.String BRIDGE_QOS_DUPLICATE_OKAY
Method Detail

getSourceDestination

public BridgeDestinationCommonMBean getSourceDestination()
Defines the source destination for the messaging bridge.

This must be an instance of either BridgeDestinationMBean or JMSBridgeDestinationMBean, which define the source destination from which the bridge reads messages.


setSourceDestination

public void setSourceDestination(BridgeDestinationCommonMBean sourceDestination)
                          throws javax.management.InvalidAttributeValueException
Defines the source destination for the messaging bridge.

This must be an instance of either BridgeDestinationMBean or JMSBridgeDestinationMBean, which define the source destination from which the bridge reads messages.

Default Value: null
Legal Value: (value != void && value != null)
Legal NULL: false

getTargetDestination

public BridgeDestinationCommonMBean getTargetDestination()
Defines the target destination for the messaging bridge.

This must be an instance of either BridgeDestinationMBean or JMSBridgeDestinationMBean, which define the target destination to which the bridge sends the messages it receives from the source destination.


setTargetDestination

public void setTargetDestination(BridgeDestinationCommonMBean targetDestination)
                          throws javax.management.InvalidAttributeValueException
Defines the target destination for the messaging bridge.

This must be an instance of either BridgeDestinationMBean or JMSBridgeDestinationMBean, which define the target destination to which the bridge sends the messages it receives from the source destination.

Default Value: null
Legal Value: (value != void && value != null)
Legal NULL: false

getSelector

public java.lang.String getSelector()
Defines the message selector for the messaging bridge.

The message selector allows you to filter the messages that are sent across the messaging bridge. Only messages that match the selection criteria are sent across the messaging bridge. For queues, messages that do not match the selection criteria are left behind and accumulate in the queue. For topics, messages that do not match the connection criteria are dropped.


setSelector

public void setSelector(java.lang.String selector)
                 throws javax.management.InvalidAttributeValueException
Defines the message selector for the messaging bridge.

The selector allows you to filter the messages that are sent across the messaging bridge. Only messages that match the selection criteria are sent across the messaging bridge. For queues, messages that do not match the selection criteria are left behind and accumulate in the queue. For topics, messages that do not match the connection criteria are dropped.


getQualityOfService

public java.lang.String getQualityOfService()
Defines one of the following QOS (quality of service) values for the messaging bridge:

Exactly-once
Each message in the source destination will be transferred to the target exactly once. This is the highest QOS a bridge can offer.
Atmost-once
One message in the source will be transferred to the target only once with the possibility of being lost during the forwarding.
Duplicate-okay
Messages in the source will not get lost but some may appear in the target more than once.


setQualityOfService

public void setQualityOfService(java.lang.String qos)
                         throws javax.management.InvalidAttributeValueException
Defines one of the following QOS (quality of service) values for the messaging bridge:

Exactly-once
Each message in the source destination will be transferred to the target exactly once. This is the highest QOS a bridge can offer.
Atmost-once
One message in the source will be transferred to the target only once with the possibility of being lost during the forwarding.
Duplicate-okay
Messages in the source will not get lost but some may appear in the target more than once.

Default Value: BRIDGE_QOS_EXACTLY_ONCE
Legal Values: BRIDGE_QOS_EXACTLY_ONCE,BRIDGE_QOS_ATMOST_ONCE,BRIDGE_QOS_DUPLICATE_OKAY

isQOSDegradationAllowed

public boolean isQOSDegradationAllowed()
Indicates whether or not the bridge allows the degradation of its QOS when the configured QOS is not available.


setQOSDegradationAllowed

public void setQOSDegradationAllowed(boolean degradationAllowed)
                              throws javax.management.InvalidAttributeValueException
Indicates whether or not the bridge allows the degradation of its QOS when the configured QOS is not available.

If set to true, the bridge will degrade the QOS when the configured QOS is not available. If this occurs, a message is delivered to the WebLogic startup window (or log file).

If set to false, and the messaging bridge cannot satisfy the quality of service requested, it will result in an error and the messaging bridge will not start.

Default Value: false

isDurabilityEnabled

public boolean isDurabilityEnabled()
Indicates whether or not the messaging bridge allows durable messages.

This only applies to a source destination that uses durable subscriptions, which allows the source JMS implementation to save messages that are sent to it while the bridge is not running. The bridge will forward these messages to the target destination when it is restarted. The administrator can choose not to be durable.


setDurabilityEnabled

public void setDurabilityEnabled(boolean durable)
                          throws javax.management.InvalidAttributeValueException
Defines whether or not the messaging bridge allows durable messages.

A messaging bridge that has this attribute set to true creates a durable subscription for its source destination--if the source destination type is a topic. This allows the source JMS implementation to save messages that are sent to it while the bridge is not running. The bridge will forward these messages to the target destination when it is restarted. If the value is set to false, messages that are sent to the source JMS topic while the bridge is down cannot be forwarded to the target destination.

Default Value: true

getReconnectDelayMinimum

public int getReconnectDelayMinimum()
Defines the minimum amount of time, in seconds, that the messaging bridge will wait before it tries to reconnect to the source or target destination after a failure.

This attribute works with the ReconnectDelayMaximum and ReconnectDelayIncrease attributes. After the first failure to connect to a destination, the bridge will wait for the number of seconds defined by ReconnectDelayMinimum.

If the second trial also fails, it will increase its waiting time by the number of seconds defined by ReconnectDelayIncrease. The maximum delay time is defined by ReconnectDelayMaximum. Once the waiting time is increased to the maximum value, the bridge will not increase its waiting time anymore.

Once the bridge successfully connects to the destination, its waiting time will be reset to the initial value defined by ReconnectDelayMinimum.


setReconnectDelayMinimum

public void setReconnectDelayMinimum(int time)
                              throws javax.management.InvalidAttributeValueException
Defines the minimum amount of time, in seconds, that the messaging bridge will wait before it tries to reconnect to the source or target destination after a failure.

This attribute works with the ReconnectDelayMaximum and ReconnectDelayIncrease attributes. After the first failure to connect to a destination, the bridge will wait for the number of seconds defined by ReconnectDelayMinimum. If the second trial also fails, it will increase its waiting time by the number of seconds defined by ReconnectDelayIncrease. The maximum delay time is defined by ReconnectDelayMaximum. Once the waiting time is increased to the maximum value, the bridge will not increase its waiting time anymore.

Once the bridge successfully connects to the destination, its waiting time will be reset to the initial value defined by ReconnectDelayMinimum.

A dynamic MBean attribute
Default Value: 15
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Long.MAX_VALUE

getReconnectDelayIncrease

public int getReconnectDelayIncrease()
Defines an incremental delay time, in milliseconds, that the messaging bridge will wait longer between one failed reconnection attempt and the next retry.

This attribute works with the ReconnectDelayMinimum and ReconnectDelayMaximum attributes. After the first failure to connect to a destination, the bridge will wait for the number of seconds defined by ReconnectDelayMinimum.

Each time a reconnect attempt fails, the bridge will increase its waiting time by the number of seconds defined by ReconnectDelayIncrease. The maximum delay time is defined by ReconnectDelayMaximum. Once the waiting time is increased to the maximum value, the bridge will not increase its waiting time anymore.

Once the bridge successfully connects to the destination, its waiting time will be reset to the minimum value defined by ReconnectDelayMinimum.


setReconnectDelayIncrease

public void setReconnectDelayIncrease(int time)
                               throws javax.management.InvalidAttributeValueException
Defines an incremental delay time, in milliseconds, that the messaging bridge will wait longer between one failed reconnection attempt and the next retry.

This attribute works with the ReconnectDelayMinimum and ReconnectDelayMaximum attributes. After the first failure to connect to a destination, the bridge will wait for the number of seconds defined by ReconnectDelayMinimum. Each time a reconnect attempt fails, the bridge will increase its waiting time by the number of seconds defined by ReconnectDelayIncrease. The maximum delay time is defined by ReconnectDelayMaximum. Once the waiting time is increased to the maximum value, the bridge will not increase its waiting time anymore.

Once the bridge successfully connects to the destination, its waiting time will be reset to the minimum value defined by ReconnectDelayMinimum.

A dynamic MBean attribute
Default Value: 5
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Long.MAX_VALUE

getReconnectDelayMaximum

public int getReconnectDelayMaximum()
Defines the longest time, in seconds, that the messaging bridge will wait between one failed attempt to reconnect to the source or target and the next retry.

This attribute works with the ReconnectDelayMinimum and ReconnectionDelayIncrement attributes. After the first failure to connect to a destination, the bridge will wait for the number of seconds defined by ReconnectDelayMinimum.

Each time a reconnect attempt fails, the bridge will increase its waiting time by the number of milliseconds defined by ReconnectDelayIncrease. The maximum delay time is defined by ReconnectDelayMaximum. Once the waiting time is increased to the maximum value, the bridge will not increase its waiting time anymore.

Once the bridge successfully connects to the destination, its waiting time will be reset to the initial value defined by ReconnectDelayMinimum.


setReconnectDelayMaximum

public void setReconnectDelayMaximum(int time)
                              throws javax.management.InvalidAttributeValueException
Defines the longest time, in seconds, that the messaging bridge will wait between one failed attempt to reconnect to the source or target and the next retry.

This attribute works with the ReconnectDelayMinimum and ReconnectionDelayIncrement attributes. After the first failure to connect to a destination, the bridge will wait for the number of seconds defined by ReconnectDelayMinimum. Each time a reconnect attempt fails, the bridge will increase its waiting time by the number of milliseconds defined by ReconnectDelayIncrease. The maximum delay time is defined by ReconnectDelayMaximum. Once the waiting time is increased to the maximum value, the bridge will not increase its waiting time anymore.

Once the bridge successfully connects to the destination, its waiting time will be reset to the initial value defined by ReconnectDelayMinimum.

A dynamic MBean attribute
Default Value: 60
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Long.MAX_VALUE

getIdleTimeMaximum

public int getIdleTimeMaximum()
Defines the maximum amount of idle time, in seconds, for the messaging bridge.

If the bridge works in asynchronous mode, the maximum idle time defines the longest time the bridge will stay idle before it checks the sanity of its connection to the source.

If the bridge works in synchronous mode, the maximum idle time defines the amount of time the bridge can block on a receive call if no transaction is involved.


setIdleTimeMaximum

public void setIdleTimeMaximum(int time)
                        throws javax.management.InvalidAttributeValueException
Defines the maximum amount of idle time, in seconds, for the messaging bridge.

If the bridge works in asynchronous mode, the maximum idle time defines the longest time the bridge will stay idle before it checks the sanity of its connection to the source.

If the bridge works in synchronous mode, the maximum idle time defines the amount of time the bridge can block on a receive call if no transaction is involved.

A dynamic MBean attribute
Default Value: 60
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Long.MAX_VALUE

getTransactionTimeout

public int getTransactionTimeout()
Defines the amount of time, in seconds, that the transaction manager will wait for each transaction before timing it out.

Transaction timeouts are used when the QOS for a bridge requires transactions. If a bridge is configured with Exactly-once QOS, the receiving and sending is completed in one transaction.


setTransactionTimeout

public void setTransactionTimeout(int timeout)
                           throws javax.management.InvalidAttributeValueException
Defines the amount of time, in seconds, that the transaction manager will wait for each transaction before timing it out.

Transaction timeouts are used when the QOS for a bridge requires transactions. If a bridge is configured with Exactly-once QOS, the receiving and sending is completed in one transaction.

A dynamic MBean attribute
Default Value: 30
Legal Minimum Value: 0
Legal Maximum Value: java.lang.Integer.MAX_VALUE

isAsyncEnabled

public boolean isAsyncEnabled()
Indicates whether or not the messaging bridge will work in asynchronous messaging mode.

Note: This attribute only applies to messaging bridges whose source destination supports asynchronous receiving.

Messaging bridges that work in asynchronous mode (true) are driven by the source destination. The messaging bridge listens for messages and forwards them as they arrive. When the value is set to false, the bridge is forced to work in synchronous mode, even if the source supports asynchronous receiving.

Note: For a messaging bridge with a QOS of Exactly-once to work in asynchronous mode, the source destination has to support the MDBTransaction interface. Otherwise, the bridge will automatically switch to synchronous mode if it detects that MDBTransactions are not supported by the source destination.


setAsyncEnabled

public void setAsyncEnabled(boolean asyncEnabled)
                     throws javax.management.InvalidAttributeValueException
Indicates whether or not the messaging bridge will work in asynchronous messaging mode.

Note: This attribute only applies to messaging bridges whose source destination supports asynchronous receiving.

Messaging bridges that work in asynchronous mode (true) are driven by the source destination. The messaging bridge listens for messages and forwards them as they arrive. When the value is set to false, the bridge is forced to work in synchronous mode, even if the source supports asynchronous receiving.

Note: For a messaging bridge with a QOS of Exactly-once to work in asynchronous mode, the source destination has to support the MDBTransaction interface. Otherwise, the bridge will automatically switch to synchronous mode if it detects that MDBTransactions are not supported by the source destination.

Default Value: true

isStarted

public boolean isStarted()
Defines the initial state of the messaging bridge (that is, the state when the bridge boots). If the value is true, the bridge is in working condition. If the value is false, the bridge is temporarily stopped.

Note: This does not indicate the run-time state of the bridge.


setStarted

public void setStarted(boolean started)
                throws javax.management.InvalidAttributeValueException
Defines the initial state of the messaging bridge (that is, the state when the bridge boots). Setting the value to true starts the bridge, if it has not been started. Setting the value to false temporarily stops the bridge.

Note: This does not indicate the run-time state of the bridge.

A dynamic MBean attribute
Default Value: true

getBatchSize

public int getBatchSize()
Specifies the number of messages that are processed within one transaction.

Note: This attribute only applies to bridges that work in synchronous mode and whose QOS require two-phase transactions.


setBatchSize

public void setBatchSize(int size)
                  throws javax.management.InvalidAttributeValueException
Specifies the number of messages that are processed within one transaction.

Note: This attribute only applies to bridges that work in synchronous mode and whose QOS require two-phase transactions.

A dynamic MBean attribute
Default Value: 10
Legal Minimum Value: 0

getBatchInterval

public long getBatchInterval()
Defines the maximum time, in milliseconds, that the bridge will wait before sending a batch of messages in one transaction, regardless of whether the Batch Size amount has been reached or not. The default value of -1 indicates that the bridge will wait until the number of messages reaches the Batch Size before it completes a transaction.

Note: This attribute only applies to bridges that work in synchronous mode and whose QOS require two-phase transactions.


setBatchInterval

public void setBatchInterval(long interval)
                      throws javax.management.InvalidAttributeValueException
Defines the maximum time, in milliseconds, that the bridge will wait before sending a batch of messages in one transaction, regardless of whether the Batch Size amount has been reached or not. The default value of -1 indicates that the bridge will wait until the number of messages reaches the Batch Size before it completes a transaction.

Note: This attribute only applies to bridges that work in synchronous mode and whose QOS require two-phase transactions.

A dynamic MBean attribute
Default Value: -1

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.