2 Replies Latest reply on Aug 8, 2008 4:03 AM by jmesnil

    managementService.registerQueue call on JournalStorageManage

    clebert.suconic

      On the latest change done by Jeff Mesnil on the management API, it was added a managementService call to register the Queue during loadBindings.

      Shouldn't that be done by the PostOffice? The JournalStorageManager doesn't seem qualified IMO.

      Maybe:

      
       class PostOfficeImpl
       {
      
      .............
      
       private void loadBindings() throws Exception
       {
       List<Binding> bindings = new ArrayList<Binding>();
      
       List<SimpleString> dests = new ArrayList<SimpleString>();
      
       storageManager.loadBindings(queueFactory, bindings, dests);
      
      
      
       for (Binding binding: bindings)
       {
       managementService.registerQueue(bindings...blablabla);
       }
      
      
       //Destinations must be added first to ensure flow controllers exist before queues are created
       for (SimpleString destination: dests)
       {
       addDestination(destination, false);
       }
      
       Map<Long, Queue> queues = new HashMap<Long, Queue>();
      
       for (Binding binding: bindings)
       {
       addBindingInMemory(binding);
      
       queues.put(binding.getQueue().getPersistenceID(), binding.getQueue());
       }
      
       storageManager.loadMessages(this, queues);
       }