CORBA 2.6 Programmer's Guide for Java

deriving objects that execute within transactional boundaries from TransactionalObject. Note that
TransactionalObject will be replaced in the future by the OTSPolicy component.
When building a Java application you would gain access to the Current interface and stub by including the file jts.jar in
your CLASSPATH specification. To see an example of building a transactional client and server, consult the jts_bank
sample program.
See Managing Transactions for additional information and design considerations for transactional applications.
Using the IDL Compiler
This section describes the NonStop CORBA Interface Definition Language (IDL) compiler. You use the IDL compiler to
generate language bindings from the interface definitions you have written in IDL for your CORBA application. (The NonStop
CORBA 2.6 IDL compiler was implemented using the ANTLR parser-generator. For information about ANTLR see
www.antlr.org.)
IDL Compiler Processing
To simply run the NonStop CORBA IDL compiler alone, you invoke the $NSD_ROOT/bin/nsdidl script with options and
specify one or more IDL files. These files contain IDL definitions and can also include preprocessor directives. Refer to IDL
Compiler Syntax for a complete description of the nsdidl command and associated options.
Preprocessing
OMG IDL preprocessing uses an ANSI C++ preprocessor to provide macro substitution, conditional compilation, and
source-file inclusion. Preprocessor directives can also provide line numbering for diagnostic messages and symbolic
debugging, and support implementation-dependent actions (the #pragma directive). Preprocessing directives begin with a
pound sign (#). Consult your ANSI C++ preprocessor documentation for further information.
The default preprocessor invoked by the IDL compiler is called cfe. You can use the -preprocessor flag to specify a
different preprocessor to be invoked by the IDL compiler.
To use the default preprocessor, the directory containing cfe must be in the PATH environment variable. For example, to use
the /usr/lib/cfe preprocessor, execute the following command from the command line or add it to your OSS .profile
or env.sh file:
export PATH=$PATH:/usr/lib
Note:
If you change your .profile file, be sure to source it in for the changes to take effect.
IDL Compiler Syntax
Preliminary IDL Compiler Setup
The IDL compiler is a Java application packaged in the $NSD_ROOT/idl/nsdidl.jar file. This jar file contains all
necessary compiler class files.
nsdidl Compiler Syntax
The following line is the command-line syntax for running the IDL compiler. The IDL compiler is invoked with the
-language Java option to generate Java code. You can display help text by using the -? option.
For example, to invoke the compiler to generate Java bindings, type the following command:
nsdidl -language Java idlfile1[, idlfile2 ]...
Preprocessor Options