2.12.2 Data Conversion
The purpose of the TYPE
parameter in the
MACHINES
section of the configuration file is to group
together machines that have the same form of data representation
(and use the same compiler) so that data conversion is done on
messages going between machines of different TYPE
s.
For the default buffer types, data conversion between unlike
machines is transparent to the user (and to the administrator and
programmer, for that matter).
If your application defines new buffer types for messages that move between machines with different data representation schemes, you must also write new encode/decode routines to be incorporated into the buffer type switch. When writing your own data conversion routines, keep the following guidelines in mind:
- You must use the semantics of the
_tmencdec
routine shown on reference pagebuffer(3c)
in Oracle Tuxedo ATMI C Function Reference; that is, you should code your routine so that it uses the same arguments and returns the same values on success or failure as the_tmencdec
routine. When defining new buffer types, follow the procedure provided in Defining Your Own Buffer Types for building servers with services that will use your new buffer type.
The encode/decode routines are called only when the Oracle
Tuxedo system determines that data is being sent between two
machines that are not of the same TYPE
.
Parent topic: Customizing a Buffer