void removeSession(JmsSessionImpl sess) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "removeSession", sess);

        synchronized (stateLock) {
            // Remove the Session
            // Note that this is a synchronized collection.
            boolean res = sessions.remove(sess);

            // Release the ordering context associated with the session
            unusedOrderingContexts.add(sess.getOrderingContext());

            if (!res && TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "session not found in list");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "removeSession");
    }
void removeSession ( JmsSessionImpl sess ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeSession" , sess ) ; synchronized ( stateLock ) { boolean res = sessions . remove ( sess ) ; unusedOrderingContexts . add ( sess . getOrderingContext ( ) ) ; if ( ! res && TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "session not found in list" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "removeSession" ) ; }
This method is used to remove a Session from the list of sessions held by
the Connection.