public void close ( ) throws SIConnectionDroppedException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "close" ) ; queue = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Returning order context to the order context pool" ) ; final ConnectionProxy cp = getConnectionProxy ( ) ; cp . addOrderContext ( getProxyID ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "close" ) ; }
This method will close the ordering context . This method should ideally be called by the API application . But at present it is called by us when the use count is 0 . The order context is only returned to the connection pool of free order contexts as this avoids an exchange with the server which is costly .