LocalClusteredQueue queue4 = new LocalClusteredQueue(office2, "node2", "queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr);
LocalClusteredQueue queue4 = new LocalClusteredQueue(office2, 2, "queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr);
   public void testClusteredNameUniqueness() throws Throwable   {      ClusteredPostOffice office1 = null;            ClusteredPostOffice office2 = null;                try      {            office1 = createClusteredPostOffice("node1", "testgroup");                  office2 = createClusteredPostOffice("node2", "testgroup");                  LocalClusteredQueue queue1 = new LocalClusteredQueue(office1, "node1", "queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr);                  Binding binding1 = office1.bindClusteredQueue("queue1", queue1);                  LocalClusteredQueue queue2 = new LocalClusteredQueue(office2, "node2", "queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr);                  Binding binding2 = office2.bindClusteredQueue("queue1", queue2);                           LocalClusteredQueue queue3 = new LocalClusteredQueue(office1, "node1", "queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr);                  try         {            Binding binding3 = office1.bindClusteredQueue("queue1", queue3);            fail();         }         catch (Exception e)         {            //Ok         }         LocalClusteredQueue queue4 = new LocalClusteredQueue(office2, "node2", "queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr);                  try         {            Binding binding4 = office2.bindClusteredQueue("queue1", queue4);            fail();         }         catch (Exception e)         {            //Ok         }                  office1.unbindClusteredQueue("queue1");                  office2.unbindClusteredQueue("queue1");                  LocalClusteredQueue queue5 = new LocalClusteredQueue(office1, "node1", "queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr);                  Binding binding5 = office1.bindClusteredQueue("queue1", queue5);                  PagingFilteredQueue queue6 = new PagingFilteredQueue("queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);                try         {            Binding binding6 = office1.bindQueue("queue1", queue6);            fail();         }         catch (Exception e)         {            //ok         }                   office1.unbindClusteredQueue("queue1");                  //It should be possible to bind local queues into a clustered post office                  PagingFilteredQueue queue7 = new PagingFilteredQueue("queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);                Binding binding7 = office1.bindQueue("queue1", queue7);                  PagingFilteredQueue queue8 = new PagingFilteredQueue("queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);                Binding binding8 = office2.bindQueue("queue1", queue8);                  PagingFilteredQueue queue9 = new PagingFilteredQueue("queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);             try         {            Binding binding9 = office1.bindQueue("queue1", queue9);            fail();         }         catch (Exception e)         {            //Ok         }      }      finally      {         if (office1 != null)         {                        office1.stop();         }                  if (office2 != null)         {            office2.stop();         }      }   }