Apache.NMS.ISession.CreateTemporaryQueue()

Here are the examples of the csharp api class Apache.NMS.ISession.CreateTemporaryQueue() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: spring-net
Source File: CachedSession.cs
public ITemporaryQueue CreateTemporaryQueue()
        {
            this.transactionOpen = true;
            return target.CreateTemporaryQueue();
        }

2. Example

Project: spring-net
Source File: RequestReplyNmsTemplate.cs
public object ConvertAndSendRequestReply(object objectToSend)
        {
            return Execute(delegate(ISession session, IMessageProducer producer)
                               {
                                   ITemporaryQueue tempQueue = null;
                                   try
                                   {
                                       tempQueue = session.CreateTemporaryQueue();
                                       this.ConvertAndSendWithDelegate(objectToSend, delegate(IMessage message)
                                                                                         {
                                                                                             message.NMSReplyTo =
                                                                                                 tempQueue;
                                                                                             return message;
                                                                                         });
                                       return ReceiveAndConvert(tempQueue);
                                   }
                                   finally
                                   {
                                       if (tempQueue != null) session.DeleteDestination(tempQueue);
                                   }
                               });
        }