postOffice.bindQueue(destination.getName(), destination.getName(), q);
postOffice.bindQueue(destination.getName(), destination.getName(), null, q);
   public synchronized void startService() throws Exception   {      super.startService();            try      {                                    postOffice = serverPeer.getQueuePostOfficeInstance();                  destination.setPostOffice(postOffice);         //Binding must be added before destination is registered in JNDI         //otherwise the user could get a reference to the destination and use it         //while it is still being loaded                  //Binding might already exist                     Binding binding = postOffice.getBindingForQueueName(destination.getName());                  QueuedExecutor executor = (QueuedExecutor)pool.get();                  if (binding != null)         {            //Reload the queue for the binding            if (binding.isActive())            {               //Do nothing - binding is already active            }            else            {               org.jboss.messaging.core.local.Queue q =                   new org.jboss.messaging.core.local.Queue(binding.getChannelId(), ms, pm, true, true,                           destination.getFullSize(), destination.getPageSize(), destination.getDownCacheSize(),                           executor, null);               q.load();               binding.setQueue(q);               binding.activate();            }         }         else         {                     //Create a new queue                                    org.jboss.messaging.core.local.Queue q =                new org.jboss.messaging.core.local.Queue(idm.getId(), ms, pm, true, true,                        destination.getFullSize(), destination.getPageSize(), destination.getDownCacheSize(),                        executor, null);                        //Make a binding for this queue            postOffice.bindQueue(destination.getName(), destination.getName(), q);         }                  //push security update to the server         sm.setSecurityConfig(isQueue(), destination.getName(), destination.getSecurityConfig());                   dm.registerDestination(destination);                 log.debug(this + " security configuration: " + (destination.getSecurityConfig() == null ?            "null" : "\n" + XMLUtil.elementToString(destination.getSecurityConfig())));                  started = true;                  log.info(this + " started, fullSize=" + destination.getFullSize() +                  ", pageSize=" + destination.getPageSize() + ", downCacheSize=" + destination.getDownCacheSize());      }      catch (Throwable t)      {         ExceptionUtil.handleJMXInvocation(t, this + " startService");      }   }