ignore exception if JNDI name for TIBCO EMS Destination is not found.
This commit is contained in:
@@ -81,8 +81,13 @@ namespace Spring.Messaging.Ems.Core
|
||||
protected override void OnSetUp()
|
||||
{
|
||||
admin = new Admin("tcp://localhost:7222", "admin", "");
|
||||
Destination destination = (Destination)lookupContext.Lookup(queueName);
|
||||
if (destination != null) admin.DestroyQueue(queueName);
|
||||
Destination destination = null;
|
||||
try
|
||||
{
|
||||
destination = (Destination) lookupContext.Lookup(queueName);
|
||||
if (destination != null) admin.DestroyQueue(queueName);
|
||||
} catch (NameNotFoundException)
|
||||
{}
|
||||
admin.CreateQueue(new QueueInfo(queueName));
|
||||
admin.BindQueue(queueName, queueName);
|
||||
admin.PurgeQueue(queueName);
|
||||
|
||||
Reference in New Issue
Block a user