![]() |
![]() |
e-docs > WebLogic Server > WebLogic Tuxedo Connector Programmer's Guide > WebLogic Tuxedo Connector JATMI VIEWs |
WebLogic Tuxedo Connector Programmer's Guide
|
WebLogic Tuxedo Connector JATMI VIEWs
The following sections provide information about how to use WebLogic Tuxedo Connector VIEW buffers:
Overview of WebLogic Tuxedo Connector VIEW Buffers
Note: For more information on Tuxedo VIEW buffers, see Using a VIEW Typed Buffer.
WebLogic Tuxedo Connector allows you to create a Java VIEW buffer type analogous to a Tuxedo VIEW buffer type derived from an independent C structure. This allows WebLogic Server applications and Tuxedo applications to pass information using a common structure. WebLogic Tuxedo Connector VIEW buffers do not support FML VIEWs or FML VIEWs/Java conversions.
How to Create a VIEW Description File
Note: fbname and null fields are not relevant for independent Java and C structures and are ignored by the Java and C VIEW compiler. You must include a value (for example, a dash) as a placeholder in these fields.
Your WebLogic Server application and your Tuxedo application must share the same information structure as defined by the VIEW description. The following format is used for each structure in the VIEW description file:
$ /* VIEW structure */
VIEW viewname
type cname fbname count flag size null
Table 7-1 VIEW Description File Fields
The following provides an example VIEW description which uses VIEW buffers to send information to and receive information from a Tuxedo application. The file name for this VIEW is infoenc.
Listing 7-1 Example VIEW Description
VIEW infoenc
#type cname fbname count flag size null
float amount AMOUNT 2 - - 0.0
short status STATUS 2 - - 0
init term TERM 2 - - 0
char mychar MYCHAR 2 - - -
string name NAME 1 - 16 -
carray carray1 CARRAY1 1 - 10 -
END
To compile a VIEW typed buffer, run the viewj command, specifying the package name and the name of the VIEW description file as arguments. The output file is written to the current directory.
To use the viewj compiler, enter the following command:
java weblogic.wtc.jatmi.viewj [package] viewfile
To use the viewj32 compiler, enter the following command:
java weblogic.wtc.jatmi.viewj32 [package] viewfile
The arguments for this command are defined as follows:
java weblogic.wtc.jatmi.viewj examples.wtc.atmi.simpview infoenc
java weblogic.wtc.jatmi.viewj32 examples.wtc.atmi.simpview infoenc
The output of the viewj command is a .java source file that contains set and get accessor methods for each field in the VIEW description file.
How to Use VIEW Buffers in JATMI Applications
Note: For an example on how to develop JATMI applications that use VIEW buffers, see the examples/wtc/atmi/simpview package in your WebLogic Server distribution.
Use the following steps when incorporating VIEW buffers in your JATMI applications:
See the examples/wtc/atmi/simpview/ViewClient.java file in your WebLogic Server distribution for an example of how a client uses accessors to pass information to and from a VIEW buffer.
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |