com.mockrunner.jms
Class ConfigurationManager

java.lang.Object
  extended by com.mockrunner.jms.ConfigurationManager
All Implemented Interfaces:
java.io.Serializable

public class ConfigurationManager
extends java.lang.Object
implements java.io.Serializable

The ConfigurationManager is used for global settings of the JMS test framework.

See Also:
Serialized Form

Constructor Summary
ConfigurationManager()
           
 
Method Summary
 boolean getDoCloneOnSend()
          Get the clone on send flag, see setDoCloneOnSend(boolean) for a description of this option.
 boolean getUseMessageSelectors()
          Get if message selectors should be used.
 void setDoCloneOnSend(boolean doCloneOnSend)
          Set if a message should be cloned before sending it.
 void setUseMessageSelectors(boolean useMessageSelectors)
          Set if message selectors should be used or simply ignored while testing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationManager

public ConfigurationManager()
Method Detail

getDoCloneOnSend

public boolean getDoCloneOnSend()
Get the clone on send flag, see setDoCloneOnSend(boolean) for a description of this option.

Returns:
the clone on send flag

setDoCloneOnSend

public void setDoCloneOnSend(boolean doCloneOnSend)
Set if a message should be cloned before sending it. Default is false, i.e. the message is not cloned. This has the advantage that the sent message can be examined afterwards (e.g. if it is acknowledged). If you set this to true, the message will be cloned, i.e. the sent message will not be altered and you have to obtain the received message in order to examine it. However, the true option is closer to a real JMS server, where you can send the same message multiple times and the messages do not influence each other.

Parameters:
doCloneOnSend - the clone on send flag, default is false

getUseMessageSelectors

public boolean getUseMessageSelectors()
Get if message selectors should be used.

Returns:
true use message selectors, false ignore message selectors

setUseMessageSelectors

public void setUseMessageSelectors(boolean useMessageSelectors)
Set if message selectors should be used or simply ignored while testing. Default is true, i.e. message selectors are used. Message selector support of Mockrunner is based on a modified version of the selector parser of the open source JMS implementation ActiveMQ. It is a bit experimental at the moment. If there are problems with the parsing or if you don't need message selectors at all, turn them off. Disabling selector parsing also results in a better test performance.

Parameters:
useMessageSelectors - true use message selectors, false ignore message selectors