| testStressSameServer(QualityOfServiceMode.ONCE_AND_ONLY_ONCE, false, 1);
}
public void testParams() throws Exception
{
JMSBridgeImpl bridge = null;
try
{
QualityOfServiceMode qosMode = QualityOfServiceMode.AT_MOST_ONCE;
int batchSize = 10;
int maxBatchTime = -1;
String sourceUsername = null;
String sourcePassword = null;
String destUsername = null;
String destPassword = null;
String selector = null;
long failureRetryInterval = 5000;
int maxRetries = 10;
String subName = null;
String clientID = null;
try
{
bridge = new JMSBridgeImpl(null,
cff1,
sourceQueueFactory,
targetQueueFactory,
sourceUsername,
sourcePassword,
destUsername,
destPassword,
selector,
failureRetryInterval,
maxRetries,
qosMode,
batchSize,
maxBatchTime,
subName,
clientID,
false);
}
catch (IllegalArgumentException e)
{
// Ok
}
try
{
bridge = new JMSBridgeImpl(cff0,
null,
sourceQueueFactory,
targetQueueFactory,
sourceUsername,
sourcePassword,
destUsername,
destPassword,
selector,
failureRetryInterval,
maxRetries,
qosMode,
batchSize,
maxBatchTime,
subName,
clientID,
false);
}
catch (IllegalArgumentException e)
{
// Ok
}
try
{
bridge = new JMSBridgeImpl(cff0,
cff1,
null,
targetQueueFactory,
sourceUsername,
sourcePassword,
destUsername,
destPassword,
selector,
failureRetryInterval,
maxRetries,
qosMode,
batchSize,
maxBatchTime,
subName,
clientID,
false);
}
catch (IllegalArgumentException e)
{
// Ok
}
try
{
bridge = new JMSBridgeImpl(cff0,
cff1,
sourceQueueFactory,
null,
sourceUsername,
sourcePassword,
destUsername,
destPassword,
selector,
failureRetryInterval,
maxRetries,
qosMode,
batchSize,
maxBatchTime,
subName,
clientID,
false);
}
catch (IllegalArgumentException e)
{
// Ok
}
try
{
bridge = new JMSBridgeImpl(cff0,
cff1,
sourceQueueFactory,
targetQueueFactory,
sourceUsername,
sourcePassword,
destUsername,
destPassword,
selector,
-2,
maxRetries,
qosMode,
batchSize,
maxBatchTime,
subName,
clientID,
false);
}
catch (IllegalArgumentException e)
{
// Ok
}
try
{
bridge = new JMSBridgeImpl(cff0,
cff1,
sourceQueueFactory,
targetQueueFactory,
sourceUsername,
sourcePassword,
destUsername,
destPassword,
selector,
-1,
10,
qosMode,
batchSize,
maxBatchTime,
subName,
clientID,
false);
}
catch (IllegalArgumentException e)
{
// Ok
}
try
{
bridge = new JMSBridgeImpl(cff0,
cff1,
sourceQueueFactory,
null,
sourceUsername,
sourcePassword,
destUsername,
destPassword,
selector,
failureRetryInterval,
maxRetries,
qosMode,
0,
maxBatchTime,
subName,
clientID,
false);
}
catch (IllegalArgumentException e)
{
// Ok
}
try
{
bridge = new JMSBridgeImpl(cff0,
cff1,
sourceQueueFactory,
null,
sourceUsername,
sourcePassword,
destUsername,
destPassword,
selector,
failureRetryInterval,
maxRetries,
qosMode,
batchSize,
-2,
subName,
clientID,
false);
}
catch (IllegalArgumentException e)
{
// Ok
}
}
finally
{
if (bridge != null)
{
bridge.stop();
}
}
}
|