public class DistributeBridgeMDO extends BridgeMDO
DistributeBridgeMDO is an MDO which
consumes JMS from one destination and randomly distributes
them across a number of other destinations.
This MDO can be used to provide a simple load balancing mechanism
consuming from one destination and sending messages to a number of different
physical destinations.
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.commons.logging.Log |
log
Logger
|
private java.util.List |
outputDestinations
a List of output Destination objects
|
| Constructor and Description |
|---|
DistributeBridgeMDO() |
| Modifier and Type | Method and Description |
|---|---|
void |
addOutputSubject(java.lang.String subject)
Adds a new output subject
|
javax.jms.Destination |
getOutputDestination()
Randomly chooses a destination from the list of destinations
|
java.util.List |
getOutputDestinations() |
protected void |
validateOutputDestination()
Validates that there is a valid output destintation that we can use.
|
acknowledge, commit, createOutputBytesMessage, createOutputMapMessage, createOutputMessage, createOutputObjectMessage, createOutputStreamMessage, createOutputTextMessage, getBufferSize, getOutputConnection, getOutputMessenger, getOutputSubject, init, isTransacted, onMessage, processMessageHeaders, rollback, setBufferSize, setOutputConnection, setOutputDestination, setOutputMessenger, setOutputSubject, setTransactedgetMessenger, getMessengerManager, setMessenger, setMessengerManagerdestroy, getLog, getServletContext, init, log, logprivate static final org.apache.commons.logging.Log log
private java.util.List outputDestinations
public java.util.List getOutputDestinations()
public void addOutputSubject(java.lang.String subject)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.Destination getOutputDestination()
throws javax.jms.JMSException
getOutputDestination in class BridgeMDOjavax.jms.JMSExceptionprotected void validateOutputDestination()
throws javax.jms.JMSException,
javax.servlet.ServletException
BridgeMDOvalidateOutputDestination in class BridgeMDOjavax.jms.JMSExceptionjavax.servlet.ServletException