Chapter 3. Maintaining Application Information

To receive ToolTalk messages, an application must provide information to the ToolTalk service describing the kinds of messages it can respond to. This information, known as message patterns, is provided dynamically either by applications as they run or through ptype and otype files.

Installing Application Types

Installing application types is not a routine task; system administrators should only install type information when an application error condition exists. Ptype and otype files are run through the ToolTalk type compiler at installation time. tt_type_comp merges the information into the Type sDatabase. The application then tells the ToolTalk service to read the type information in the Types Database. The following message indicates that an application error condition exists:

Application is not an installed type. 

To install an application's ptype and otype files, follow these steps:

  1. Run tt_type_comp on your type file.

    % tt_type_comp <your-file>
    

    tt_type_comp runs your-file through cpp, compiles the type definitions, and merges the information into the Types Database.

    Table 3-1. ToolTalk Types Databases

    Database

    Types Database Used

    user

    ~/.tt/types.xdr

    system

    /etc/tt/types.xdr

    network

    $OPENWINHOME/tt/t ypes.xdr

    By default, tt_type_comp uses the user database. To specify another database, use the -d option; for example:

    % tt_type_comp -d user|system|network <your-file> 
    

    For more information on tt_type_comp, see tt_type_comp(1).

  2. Force ttsession to reread the Types Database.

    To force ttsession to reread the Types Database, see the instructions in “Updating the ToolTalk Service”

Examining ToolTalk Type Information

You can examine all type information, only the ptype information, or only the otype information in a specified Types Database. To specify the database you want to examine, use the -d option and supply the name of the user, system, or network to indicate the desired database. If the -d option is not used, tt_type_comp will use the user database by default.

  • To examine all the ToolTalk type information in a Types Database, enter the following line:

    % tt_type_comp -p 
    

    The type information will be printed out in source format.

  • To list all ptypes in a Types database, enter the following line:

    % tt_type_comp -P 
    

Removing ToolTalk Type Information

You can remove both ptype and otype information from the Types Database.

  • Use tt_type_comp to remove type information. Enter the following line:

    % tt_type_comp -d user|system|network -r type 
    

    For example, to remove a ptype called Sun_EditDemo from the network database of a sample application, enter the line:

    % tt_type_comp -d network -r Sun_EditDemo 
    

After you remove type information from the Types Database, force ttsession to read the Types Database again to bring the ToolTalk service up-to-date. See “Updating the ToolTalk Service”

Updating the ToolTalk Service

Use ttsession to force the ToolTalk service to read the type information in the Types Database.

  1. Enter the ps command to find the process identifier (pid) of the ttsession process.

    % ps -elf | grep ttsession
    

  2. Enter the kill command to send a SIGUSR2 signal to ttsession.

    % kill -USR2 <ttsession pid>
    

Process Type Errors

One or both of the following conditions exists if application users report the error:

Application is not an installed ptype.

  • The ToolTalk service has not been instructed by the application to read the type information in the Types Database. See “Updating the ToolTalk Service” for instructions on how to force the ToolTalk service to reread type information from the Types Database.

  • The application's ptypes and otypes have not been compiled and merged into the Types Database. See “Installing Application Types” for instructions on how to compile and merge type information.