$session->reattach( );

Reestablishes a connection that has been detached or broken.

The reattach() function can be called to reconnect to a server to which the connection has been lost. Reestablishing the connection does not automatically reestablish observer sessions, subscriptions, transactional or other session state information.

If the call is used to reattach a session that had an active observer, the observer connection is closed as a side effect of the action and must be reopened separately.

This function should be called after a [13] I/O Error is thrown by any of the Domain Manager access calls in order to shut down and reopen the socket, leaving the session in a working state. If this step is not taken, there is a danger that residual packets on the connection would cause synchronization problems between the client and Domain Manager. “Error handling” on page 68 describes error prefixes, including the [13] prefix.


The reattach() primitive does not return a new session identifier, but does refresh the referenced one. This is not a dup() style of action.