5 Replies Latest reply on Sep 26, 2006 4:40 PM by Tim Fox

    Where is DeliveryRunnable being used?

    Clebert Suconic Master

      It looks like org.jboss.jms.server.endpoint.DeliveryRunnable is not being used anywhere.

      There is a inner class of ChannelSupport which is being used instead.

      Is this correct? Can we delete the class if it's not being used?

        • 1. Re: Where is DeliveryRunnable being used?
          Tim Fox Master

          Well, I think you're right that DeliveryRunnable is not used any more for delivering messages to clients.

          The class that is used is called org.jboss.jms.server.endpoint.ClientDelivery.

          Inner classes of channel support are not used for client deliveries.

          Anyway... you may as well go and delete it.

          • 2. Re: Where is DeliveryRunnable being used?
            Clebert Suconic Master

             

            Inner classes of channel support are not used for client deliveries.


            ChannelSupport.deliver(boolean) is callin new DeliveryRunnable (The inner class version).

            Maybe I didn't understand what you meant by not being used for client deliveries.


            Just for convenience I have copied the code I'm referring to:

            public void deliver(boolean synchronous)
             {
             checkClosed();
            
             // We put a delivery request on the event queue.
             try
             {
             Future future = null;
            
             if (synchronous)
             {
             future = new Future();
             }
             //TODO we should keep track of how many deliveries are currently in the queue
             //so we don't execute another delivery when one is in the queue, since
             //this is pointless
            
             this.executor.execute(new DeliveryRunnable(future));
            
             if (synchronous)
             {
             // Wait to complete
             future.getResult();
             }
             }
             catch (InterruptedException e)
             {
             log.warn("Thread interrupted", e);
             }
             }




            • 3. Re: Where is DeliveryRunnable being used?
              Tim Fox Master

              Ok, this is an accident of naming :(

              ChannelSupport::DeliveryRunnable has a completely different purpose to the other (unused) DeliveryRunnable class - there's no connection at all.

              • 4. Re: Where is DeliveryRunnable being used?
                Clebert Suconic Master

                Ok, I just deleted DeliveryRunnable.


                ClientDelivery is the a Serializable Container during used on Callbacks to send the message to the Client, if I understood correct.

                ChannelSupport::DeliveryRunnable is being used on executor to send messages on the Queue?

                So... We will have one executor per consumer Endpoint?

                • 5. Re: Where is DeliveryRunnable being used?
                  Tim Fox Master

                   

                  "clebert.suconic@jboss.com" wrote:
                  Ok, I just deleted DeliveryRunnable.


                  ClientDelivery is the a Serializable Container during used on Callbacks to send the message to the Client, if I understood correct.


                  Yes, although in TRUNK it is not serializable - in fact none of the stuff we send across the network is serializable any more - they implement a Streamable interface.



                  ChannelSupport::DeliveryRunnable is being used on executor to send messages on the Queue?


                  That's right. Each queues uses an executor and all adds and delivers for that queue are handled by that executor. This is part of the SEDA style approach we are (semi) doing.


                  So... We will have one executor per consumer Endpoint?


                  Each consumer endpoint uses a particular executor, but it may share one with another endpoint.