Connection states

This topic discusses the different connection states and ways to change them.

If an application processes a CONNECT statement and the server name is known to the application requester and is not in the set of existing connections of the activation group, then:
  • The current connection is placed in the dormant state and held state.
  • The server name is added to the set of connections and the new connection is placed in the current and held state.

If the server name is already in the set of existing connections of the activation group, an error occurs.

A connection in the dormant state is placed in the current state using the SET CONNECTION statement. When a connection is placed in the current state, the previous current connection, if any, is placed in the dormant state. No more than one connection in the set of existing connections of an activation group can be current at any time. Changing the state of a connection from current to dormant or from dormant to current has no effect on its held or released state.

A connection is placed in the released state by the RELEASE statement. When an activation group executes a commit operation, every released connection of the activation group is ended. Changing the state of a connection from held to released has no effect on its current or dormant state. Thus, a connection in the released state can still be used until the next commit operation. There is no way to change the state of a connection from released to held.