bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

WebLogic Tuxedo Connector Programmer's Guide

 Previous Next Contents View as PDF  

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

where

Example View Description File

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

 


How to Use the viewj Compiler

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:

Argument

Description

package

The package name to be included in the .java source file.

Example: examples.wtc.atmi.simpview

viewfile

Name of the View description file.

Example: Infoenc

For example:

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. You must compile the .java file and import the class into your Java source files.

 


How to Use View Buffers in JATMI Applications

Use the following steps when incorporating View buffers in your JATMI applications:

  1. Create a View description file for your application as described in How to Create a View Description File
  2. Compile the View description file as described in How to Use the viewj Compiler
  3. Import the output of the View compiler into your source code.
  4. If necessary, compile the View description file for your Tuxedo application and include the output in your C source file as described in Using a VIEW Typed Buffer.
  5. Configure a WTCServer MBean with a Resources Mbean that specifies the View buffer type (View or View32) and the fully qualified class name of the compiled Java View description file.
  6. Build and launch your Tuxedo application.
  7. Build and launch your WebLogic Server Application.

 

Back to Top Previous Next