Ejemplo n.º 1
0
		public void ShouldAllocateReturnConnectionToPool ()
		{
			CreateConnectionDelegate handler = delegate (string host) {
				return connection;
			};
			
			MessagingContextPool pool = new MessagingContextPool (messageFactory, 
				                                                  handler);
			IMessagingContext context1 = pool.GetContext ("foo");
			Assert.IsNotNull (context1);
			context1.Dispose ();
			IMessagingContext context2 = pool.GetContext ("foo");
			Assert.AreEqual (context1, context2);
		}
Ejemplo n.º 2
0
 public RabbitMQMessagingProvider()
 {
     localIp     = GetLocalIP();
     contextPool = new MessagingContextPool(new MessageFactory(this),
                                            CreateConnection);
 }
Ejemplo n.º 3
0
		public RabbitMQMessagingProvider ()
		{
			localIp = GetLocalIP ();
			contextPool = new MessagingContextPool (new MessageFactory (this),
													CreateConnection);
		}
Ejemplo n.º 4
0
 public RabbitMQMessageQueueTransaction(string txId, MessagingContextPool contextPool)
 {
     this.txId        = txId;
     this.contextPool = contextPool;
 }
 public RabbitMQMessagingProvider()
 {
     localId     = Guid.NewGuid();
     contextPool = new MessagingContextPool(new MessageFactory(this),
                                            CreateConnection);
 }
		public RabbitMQMessageQueueTransaction (string txId, MessagingContextPool contextPool)
		{
			this.txId = txId;
			this.contextPool = contextPool;
		}