//The exchange doesnt exist, cant procede.
return false;
}
//create the MBean proxy
ManagedExchange managedExchange = (ManagedExchange) MBeanServerInvocationHandler.newProxyInstance(
mbsc, (ObjectName) exchanges.toArray()[0], ManagedExchange.class, false);
try
{
//create the new durable queue and bind it.
vhostManager.createNewQueue(queueName, null, true);
managedExchange.createNewBinding(queueName,queueName);
}
catch (Exception e)
{
System.out.println("Could not add queue due to exception :" + e.getMessage());
e.printStackTrace();