#### 8.5.4.22 Partition Attribute Termination

The Ada Reference Manual does not provide any specific rule to handle global termination of a distributed application (see Abortion and Termination).

In PolyORB/DSA, by default, a set of partitions terminates when each partition can terminate and when no message remains to be delivered. A distributed algorithm that checks for this global condition is activated periodically by the main boot server.

    TERMINATION_LITERAL ::= Global_Termination |
                            Local_Termination  |
                            Deferred_Termination

    REPRESENTATION_CLAUSE ::=
       for PARTITION_IDENTIFIER'Termination use TERMINATION_LITERAL;

- When a partition is configured with the global termination policy, it terminates as soon as the main boot server sends a signal to do so. The main boot server checks periodically whether the application can terminate. When all partitions are ready to terminate, the main boot server sends to each partition a termination request. The global termination policy is the default policy.
- The deferred termination policy is very similar to the global termination. The only difference is that when a partition with a deferred termination policy receives a termination request, it just ignores it. This policy allows a partition to run forever without preventing a set of partitions from terminating.
- When a partition is configured with the local termination policy, it terminates as soon as the classical Ada termination is detected by the partition. It means that this partition does not wait for the termination request of the main boot server.