Esempio n. 1
0
        public void InvalidateSession(PooledSession session)
        {
            try
            {
                connectionPool.OnSessionInvalidated(session);

                // Ensure the bad session is closed.
                session.InternalSession.Close();
            }
            catch (NMSException)
            {
                throw;
            }
            catch (Exception e)
            {
                throw new NMSException("Error while invalidating a Session", e);
            }
        }
Esempio n. 2
0
 public void ReturnSession(PooledSession session)
 {
     try
     {
         connectionPool.OnSessionReturned(session);
     }
     catch (NMSException)
     {
         throw;
     }
     catch (Exception e)
     {
         throw new NMSException("Error while returning a Session", e);
     }
     finally
     {
         if (!connectionPool.IsClosed)
         {
             sessionPool.ReturnObject(session);
         }
     }
 }
Esempio n. 3
0
 public void ReturnSession(PooledSession session)
 {
     try
     {
         connectionPool.OnSessionReturned(session);
     }
     catch (NMSException)
     {
         throw;
     }
     catch (Exception e)
     {
         throw new NMSException("Error while returning a Session", e);
     }
     finally
     {
         if (!connectionPool.IsClosed)
         {
             sessionPool.ReturnObject(session);
         }
     }
 }
Esempio n. 4
0
 internal void OnSessionInvalidated(PooledSession session)
 {
     this.loanedSessions.Remove(session);
 }
Esempio n. 5
0
 internal void OnSessionReturned(PooledSession session)
 {
     this.loanedSessions.Remove(session);
 }
Esempio n. 6
0
        public void InvalidateSession(PooledSession session)
        {
            try
            {
                connectionPool.OnSessionInvalidated(session);

                // Ensure the bad session is closed.
                session.InternalSession.Close();
            }
            catch (NMSException)
            {
                throw;
            }
            catch (Exception e)
            {
                throw new NMSException("Error while invalidating a Session", e);
            }
        }
 public PooledMessageConsumer(PooledSession session, IMessageConsumer consumer)
 {
     this.consumer = consumer;
     this.session = session;
 }
 public PooledMessageConsumer(PooledSession session, IMessageConsumer consumer)
 {
     this.consumer = consumer;
     this.session  = session;
 }
Esempio n. 9
0
 internal void OnSessionInvalidated(PooledSession session)
 {
     this.loanedSessions.Remove(session);
 }
Esempio n. 10
0
 internal void OnSessionReturned(PooledSession session)
 {
     this.loanedSessions.Remove(session);
 }
Esempio n. 11
0
 public PooledQueueBrowser(PooledSession session, IQueueBrowser browser)
 {
     this.session = session;
     this.browser = browser;
 }
Esempio n. 12
0
 public PooledQueueBrowser(PooledSession session, IQueueBrowser browser)
 {
     this.session = session;
     this.browser = browser;
 }