Queue queue = new MessagingQueue(mapping.getNodeId(), mapping.getQueueName(), mapping.getChannelId(),
mapping.isRecoverable(), filter, true);
Condition condition = conditionFactory.createCondition(mapping.getConditionText());
addBindingInMemory(new Binding(condition, queue, false));
if (mapping.isAllNodes())
{
// insert into db if not already there
if (!loadedBindings.containsKey(queue.getName()))
{
//Create a local binding too
long channelID = channelIDManager.getID();
Queue queue2 = new MessagingQueue(thisNodeID, mapping.getQueueName(), channelID, ms, pm,
mapping.isRecoverable(), mapping.getMaxSize(), filter,
mapping.getFullSize(), mapping.getPageSize(), mapping.getDownCacheSize(),
true, mapping.getRecoverDeliveriesTimeout());
Binding localBinding = new Binding(condition, queue2, true);
if (mapping.isRecoverable())
{
//We need to insert it into the database
if (trace) { log.trace(this + " got all binding in state for queue " + queue.getName() + " inserting it in DB"); }