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 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); } } }
internal void OnSessionInvalidated(PooledSession session) { this.loanedSessions.Remove(session); }
internal void OnSessionReturned(PooledSession session) { this.loanedSessions.Remove(session); }
public PooledMessageConsumer(PooledSession session, IMessageConsumer consumer) { this.consumer = consumer; this.session = session; }
public PooledQueueBrowser(PooledSession session, IQueueBrowser browser) { this.session = session; this.browser = browser; }