State management is the way you control the saving and restoring of object state during object deactivation and activation. State management also affects the duration of object activation, which influences the performance of servers and their resource usage. The external API of the TP Framework includes the activate_object() and deactivate_object() methods, which provide a possible location for state management code. Additionally, the TP Framework API includes the deactivateEnable() method to enable the user to control the timing of object deactivation. The default duration of object activation is controlled by policies assigned to implementations at OMG IDL compile time.The four optional pragmas allow you to set a specific policy as the default policy for the entire ICF for all implementations that do not have an explicit activation_policy, transaction_policy, concurrency_policy, or retry_policy statement. This feature relieves the programmer from having to specify policies for each implementation and/or allows overriding of the defaults.The module-name variable is optional if it is optional in the OMG IDL file. This variable is used for scoping and grouping. Its use must be consistent with the way it is used inside the OMG IDL file.This variable is optional and is used as the name of the servant or as the class name in the server. It is constructed using interface-name with an _i appended if it is not specified by the programmer.Listing 2‑1 shows a sample ICF file.Listing 2‑1 Sample ICFYou have the option of either coding the ICF file manually or using the genicf command to generate it from the OMG IDL file. For a description of the syntax and options for the genicf command, see the Oracle Tuxedo Command Reference.