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, setTransacted
getMessenger, getMessengerManager, setMessenger, setMessengerManager
destroy, getLog, getServletContext, init, log, log
private 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.JMSException
public javax.jms.Destination getOutputDestination() throws javax.jms.JMSException
getOutputDestination
in class BridgeMDO
javax.jms.JMSException
protected void validateOutputDestination() throws javax.jms.JMSException, javax.servlet.ServletException
BridgeMDO
validateOutputDestination
in class BridgeMDO
javax.jms.JMSException
javax.servlet.ServletException