mapping.isRecoverable(), filter, mapping.isClustered());
Condition condition = conditionFactory.createCondition(mapping.getConditionText());
//addBindingInMemory(new Binding(condition, queue, mapping.isAllNodes()));
addBindingInMemory(new Binding(condition, queue, false));
if (allNodes)
{
if (trace) { log.trace("allNodes is true, so also forcing a local bind"); }
//There is the possibility that two nodes send a bind all with the same name simultaneously OR
//a node starts and sends a bind "ALL" and the other nodes already have a queue with that name
//This is ok - but we must check for this and not create the local binding in this case
//Bind locally
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());
//We must cast back asynchronously to avoid deadlock
//we need put adding binding and queue's loading and activations into one sync block
//https://jira.jboss.org/jira/browse/JBMESSAGING-1760
synchronized (queue2)
{
boolean added = internalAddBinding(new Binding(condition, queue2, true), false, false);
if (added)
{
if (trace)
{