In most cases, the Ice run time closes a connection gracefully as required by the Ice protocol (see
Section 34.3.6). The Ice run time only closes a connection forcefully when a timeout occurs or when the application explicitly requests it.
•
In the process that initiates closure, incoming and outgoing requests that are in progress are allowed to complete, and then a close connection message is sent to the peer. Any incoming requests received after closure is initiated are silently discarded (but may be retried, as discussed in the next bullet). An attempt to make a new outgoing request on the connection results in a
CloseConnectionException and an automatic retry (if enabled).
As discussed in Section 28.13, oneway invocations are generally considered reliable because they are sent over a stream-oriented transport. However, it is quite possible for oneway requests to be silently discarded if a server has initiated graceful connection closure (see
Section 33.6.1). Whereas graceful closure causes a discarded twoway request to receive a
CloseConnectionException and eventually be retried, the sender receives no notice about a discarded oneway request.
If an application makes assumptions about the reliability of oneway requests, it may be necessary to control the events surrounding connection closure as much as possible, for example by disabling active connection management (see
Section 33.4) and avoiding explicit connection closures.