Close() 공개 메소드

public Close ( ) : void
리턴 void
예제 #1
0
        public IMessageProducer CreateProducer(IDestination destination)
        {
            MessageProducer producer = null;

            try
            {
                ActiveMQDestination dest = null;
                if (destination != null)
                {
                    dest = ActiveMQDestination.Transform(destination);
                }

                producer = DoCreateMessageProducer(GetNextProducerId(), dest);

                producer.ProducerTransformer = this.ProducerTransformer;

                this.AddProducer(producer);
                this.Connection.Oneway(producer.ProducerInfo);
            }
            catch (Exception)
            {
                if (producer != null)
                {
                    this.RemoveProducer(producer.ProducerId);
                    producer.Close();
                }

                throw;
            }

            return(producer);
        }
예제 #2
0
        public IMessageProducer CreateProducer(IDestination destination)
        {
            ProducerInfo    command    = CreateProducerInfo(destination);
            ProducerId      producerId = command.ProducerId;
            MessageProducer producer   = null;

            try
            {
                producer = new MessageProducer(this, command);
                producers[producerId] = producer;
                this.connection.Oneway(command);
            }
            catch (Exception)
            {
                if (producer != null)
                {
                    producer.Close();
                }

                throw;
            }

            // Registered with Connection so it can process Producer Acks.
            connection.addProducer(producerId, producer);

            return(producer);
        }
예제 #3
0
        public IMessageProducer CreateProducer(IDestination destination)
        {
            ProducerInfo    command    = CreateProducerInfo(destination);
            ProducerId      producerId = command.ProducerId;
            MessageProducer producer   = null;

            try
            {
                producer = new MessageProducer(this, command);
                producers[producerId] = producer;
                this.DoSend(command);
            }
            catch (Exception)
            {
                if (producer != null)
                {
                    producer.Close();
                }

                throw;
            }

            return(producer);
        }
예제 #4
0
 public void Close()
 {
     producer.Close();
 }
예제 #5
0
파일: Session.cs 프로젝트: Redi0/meijing-ui
        public IMessageProducer CreateProducer(IDestination destination)
        {
            MessageProducer producer = null;

            try
            {
                ActiveMQDestination dest = null;
                if(destination != null)
                {
                    dest = ActiveMQDestination.Transform(destination);
                }

                producer = new MessageProducer(this, GetNextProducerId(), dest, this.RequestTimeout);

                producer.ProducerTransformer = this.ProducerTransformer;

                this.AddProducer(producer);
                this.Connection.Oneway(producer.ProducerInfo);
            }
            catch(Exception)
            {
                if(producer != null)
                {
                    this.RemoveProducer(producer.ProducerId);
                    producer.Close();
                }

                throw;
            }

            return producer;
        }