![]() |
![]() |
BEA WebLogic Enterprise 4.2 Developer Center |
![]() HOME | SITE MAP | SEARCH | CONTACT | GLOSSARY | PDF FILES | WHAT'S NEW |
||
![]() C++ REFERENCE | TABLE OF CONTENTS | PREVIOUS TOPIC | NEXT TOPIC |
This chapter is an alphabetical reference that describes each WLE development command and Interface Repository administration command for the Windows NT and UNIX environments. A list of valid parameters and options is shown for each command.
The following commands are described:
buildobjclient
Note:
For descriptions of the idl2ir
, irdel
, and ir2idl
commands, see the Administration Guide.
Before executing a WLE command, you must ensure that the On Windows NT
On UNIX
For c shell (csh) For Bourne (sh) or Korn (ksh): To set environment variables:
On Windows NT
On UNIX:
For c shell: For Bourne and Korn (sh/ksh): bin
directory is in
your defined path:
Set Path=%TUXDIR%\Bin;%Path%
: set path = ($TUXDIR/bin $path)
PATH=$TUXDIR/bin:$PATH
export PATHset var=value
setenv var value
var=value
export var buildobjclient
Synopsis
Constructs a WLE client application.
Syntax
buildobjclient [-v][-o name] [-f firstfile-syntax] [-l
lastfile-syntax] -PDescription
Use the
buildobjclient
command to construct a WLE client application. The command combines the files specified in the-f
and-l
options with the standard WLE libraries to form a client application. The client application is built using the default C++ language compile command defined for the operating system in use.All specified
.c
and.cpp
files are compiled in one invocation of the compilation system for the operating system in use. Users may specify the compiler to invoke by setting theCC
environment variable to the name of the compiler. If theCC
environment variable is not defined whenbuildobjclient
is invoked, the default C++ language compile command for the operating system in use will be invoked to compile all.c
and.cpp
files.Users may specify options to be passed to the compiler by setting the
CFLAGS
or theCPPFLAGS
environment variables. IfCFLAGS
is not defined whenbuildobjclient
is invoked, thebuildobjclient
command uses the value ofCPPFLAGS
if that variable is defined.Options
-v
- Specifies that the
buildobjclient
command should work in verbose mode. In particular, it writes the compile command to its standard output.-o name
- Specifies the name of the client application generated by this command. If the name is not supplied, the application file is named
client<.type>
, where type is an extension that is dependent on the operating system for an application (for example, on a UNIX system, there would not be atype
; on a Windows NT system, thetype
would be.EXE
).-f firstfile-syntax
- Specifies a file to be included first in the compile and link phases of the
buildobjclient
command. The specified file is included before the WLE libraries are included. There are three ways of specifying a file or files, as shown in Table 10-1.
Note: Filenames that include spaces are not supported
Note: The
-f
option may be specified multiple times.-l lastfile-syntax
- Specifies a file to be included last in the compile and link phases of the
buildobjclient
command. The specified file is included after the WLE libraries are included. There are three ways of specifying a file, as shown in Table 10-2.
Note: The
-l
option may be specified multiple times.-P
- Specifies that the appropriate POA libraries should be linked into the image (that is, libraries that allow a client to also function as a server). The resulting image can act as a server and can use the
Callbacks
wrapper class for creating objects. The resulting joint client/server cannot take advantage of the object state management and transaction management provided by the WLE TP Framework. The-P
switch should have been passed to the IDL compiler when generating the client. Usebuildobjserver
to build a server with all the support provided by the TP Framework. The default is to not link in the server libraries; that is, the default is to create a client only, not a joint client/server.-h or -?
- Provides help that explains the usage of the
buildobjclient
command. No other action results.Environment
Variables
TUXDIR
- Finds the WLE libraries and include files to use when compiling the client applications.
CC
- Indicates the compiler to use to compile all files with
.c
or.cpp
file extensions. If not defined, the default C++ language compile command for the operating system in use will be invoked to compile all.c
and.cpp
files.CFLAGS
- Indicates any arguments that are passed as part of the compiler command line for any files with a
.c
or.cpp
file extensions. IfCFLAGS
does not exist in thebuildobjclient
command environment, thebuildobjclient
command checks for theCPPFLAGS
environment variable.CPPFLAGS
Note: Arguments passed by the
CFLAGS
environment variable take priority over theCPPFLAGS
variable.- Contains a set of arguments that are passed as part of the compiler command line for any files with a
.c
or.cpp
file extensions.- This is in addition to the command line option
"-I$(TUXDIR)/include"
for UNIX systems or thecommand line option
/I%TUXDIR%\include
for Windows NT systems, which is passed automatically by thebuildobjclient
command. IfCPPFLAGS
does not exist in thebuildobjclient
command environment, no compiler commands are added.LD_LIBRARY_PATH
(UNIX systems)- Indicates which directories contain shared objects to be used by the compiler, in addition to the objects shared by the WLE software. A colon (:) is used to separate the list of directories.
LIB
(Windows NT systems)- Indicates a list of directories within which to find libraries. A semicolon (;) is used to separate the list of directories.
Portability
The
buildobjclient
command is not supported on client-only platforms.Examples
The following example builds a WLE client application on an NT system:
set CPPFLAGS=-I%APPDIR%\include
buildobjclient -o empclient.exe -f emp_c.cpp -l userlib1.libThe following example builds a WLE client application on a UNIX system using the c shell:setenv CPPFLAGS=$APPDIR/include
buildobjclient -o empclient -f emp_c.cpp -l userlib1.a
Synopsis
Constructs a WLE server application.
Syntax
buildobjserver [-v] [-o name] [-f firstfile-syntax]
[-l lastfile-syntax] [-r rmname]Description
Use the
buildobjserver
command to construct a WLE server application. The command combines the files specified in the-f
and-l
options with the main routine and the standard WLE libraries to form a server application. The server application is built using the default C++ compiler provided for the platform.All specified
.c
and.cpp
files are compiled in one invocation of the compilation system for the operating system in use. Users may specify the compiler to invoke by setting theCC
environment variable to the name of the compiler. If theCC
environment variable is not defined whenbuildobjserver
is invoked, the default C++ language compile command for the operating system in use will be invoked to compile all.c
and.cpp
files.Users may specify options to be passed to the compiler by setting the
CFLAGS
or theCPPFLAGS
environment variables. IfCFLAGS
is not defined whenbuildobjserver
is invoked, thebuildobjserver
command uses the value ofCPPFLAGS
if that variable is defined.Options
-v
- Specifies that the
buildobjserver
command should work in verbose mode. In particular, it writes the compile command to its standard output.-o
name
- Specifies the name of the server application generated by this command. If the name is not supplied, the application file is named
server<.type>
, where type is the extension that is dependent on the operating system for an application (for example, on UNIX systems, there would not be atype
; on Windows NT systems, thetype
would be.EXE
).-f firstfile-syntax
- Specifies a file to be included first in the compile and link phases of the
buildobjserver
command. The specified file is included before the WLE libraries are included. For a description of the three ways to specify a file or files, see Table 10-1, "Specifying the First Filename(s)," on page 10-4.-l lastfile-syntax
- Specifies a file to be included last in the compile and link phases of the
buildobjserver
command. The specified file is included after the WLE libraries are included. For a description of the three ways to specify a file or files, see Table 10-2, "Specifying the Last Filename(s)," on page 10-4.-r rmname
- Specifies the resource manager associated with this server. The value
rmname
must appear in the resource manager table located in$TUXDIR/udataobj/RM
on UNIX systems or%TUXDIR%\udataobj\RM
on Windows NT systems.- Each entry in this file is of the form
rmname:rmstructure_name:library_names.
- Using the
rmname
value, the entry in$TUXDIR/udataobj/RM
or%TUXDIR%\udataobj\RM
automatically includes the associated libraries for the resource manager and properly sets up the interface between the transaction manager and the resource manager. The valueTUXEDO/SQL
includes the libraries for the BEA TUXEDO System/SQL resource manager. Other values can be specified as they are added to the resource manager table. If the-r
option is not specified, the default is to use the null resource manager.-h or -?
- Provides help that explains the usage of the
buildobjserver
command. No other action results.Environment
Variables
TUXDIR
- Finds the WLE libraries and include files to use when compiling the server application.
CC
- Indicates the compiler to use to compile all files with
.c
or.cpp
file extensions that are passed in through the-l
or-f
options.CFLAGS
- Specifies any arguments that are passed as part of the compiler command line for any files with
.c
or.cpp
file extensions. IfCFLAGS
does not exist in thebuildobjserver
command environment, the buildobjserver command checks for theCPPFLAGS
environment variable.CPPFLAGS
Note: Arguments passed by the
CFLAGS
environment variable take priority over theCPPFLAGS
environment variable.- Contains a set of arguments that are passed as part of the compiler command line for any files with a
.c
or.cpp
file extensions.This is in addition to the command line option-I$(TUXDIR)/include
for UNIX systems or thecommand line option
/I%TUXDIR%\include
for Windows NT systems, which is passed automatically by thebuildobjserver
command. IfCPPFLAGS
does not exist in thebuildobjserver
command environment, no compiler commands are added.LD_LIBRARY_PATH
(UNIX systems)- Indicates which directories contain shared objects to be used by the compiler, in addition to the WLE shared objects. A colon (:) is used to separate the list of directories.
LIB
(Windows NT systems)- Indicates a list of directories within which to find libraries. A semicolon (;) is used to separate the list of directories.
Portability
The
buildobjserver
command is not supported on client-only WLE systems.Examples
The following example builds a WLE server application on a UNIX system using the
emp_s.cpp
andemp_i.cpp files
:
buildobjserver -r TUXEDO/SQL -o unobserved
-f "emp_s.cpp emp_i.cpp"The following example shows how to use the
CC
andCFLAGS
environment variables with thebuildobjserver
command. The example also shows how to link in the math library on UNIX systems using the Bourne or Korn shells using the-f
and-lm
options:CFLAGS=-g CC=/bin/cc \
buildobjserver -r TUXEDO/SQL -o TLR -f TLR.o -f util.o -l -lmThe following example shows how to use the
buildobjserver
command on UNIX systems with no resource manager specified:buildobjserver -o PRINTER -f PRINTER.oSample RM Files
The following are sample RM files for all the supported operating system platforms:
Windows NT
Oracle_XA;xaosw;C:\Orant\rdbms73\xa\xa73.lib
C:\Orant\pro22\lib\msvc\sqllib18.libSolaris
Oracle_XA:xaosw:-L$ORACLE_HOME/rdbms/lib
-L$ORACLE_HOME/precomp/lib -lc
-L/home4/m01/app/oracle/product/7.3.2/lib -lsql -lclntsh
-lsqlnet -lncr -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6
-lcore3 -lsocket -lnsl -lm -ldl -lthreadTru64 UNIX
Oracle_XA:xaosw:-L${ORACLE_HOME}/lib -lxa
${ORACLE_HOME}/lib/libsql.a -lsqlnet -lncr -lsqlnet
${ORACLE_HOME}/lib/libclient.a -lcommon -lgeneric -lsqlnet
-lncr -lsqlnet ${ORACLE_HOME}/lib/libclient.a -lcommon
-lgeneric -lepc -lepcpt -lnlsrtl3 -lc3v6 -lcore3
-lnlsrtl3 -lcore3 -lnlsrtl3 -lmAIX
Oracle_XA:xaosw:-L${ORACLE_HOME}/lib -lxa -lsql -lsqlnet
-lncr -lclient -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6
-lcore3 -lm -lldHP-UX : Oracle 8.04
Oracle_XA:xaosw:-L${ORACLE_HOME}/lib -lclntsh
Synopsis
Generates an ICF file.
Syntax
genicf [options] idl-filename...
Description
Given the
idl-filename(s)
, generates an ICF file that provides the code generation process with additional information about policies on implementations and the relationship between implementations and the interface they implement. If an ICF file is provided as input to theidl
command, theidl
command generates server code for only the implementation/interface pairs specified in the ICF file.The generated ICF file has the same filename as the first
idl-filename
specified on the command line, but with a.icf
extension.If incorrect OMG IDL syntax is specified in the
idl-filename(s)
file, appropriate errors are returned.Options
-D identifier=[definition]
- Performs the same function as the
#define
C++ preprocessor directive; that is, the-D
option defines a token string or a macro to be substituted for every occurrence of a given identifier in the definition file. If a definition is not specified, the identifier is defined as 1. Multiple-D
options can be specified. White space between the-D
option and the identifier is optional.-I pathname
- Specifies directories within which to search for include files, in addition to any directories specified with the
#include
OMG IDL preprocessor directive. Multiple directories can be specified by using multiple-I
options.- There are two types of
#include
OMG IDL preprocessor directives: system (for example,<a.idl>
) and user (for example,"a.idl
"). On UNIX systems, the path for system#include
directories is/usr/include
and any directories specified with the-I
option; the path for user#include
directives is the location of the file containing the#include
directive, followed by the path specified for the system#include
directive. On Windows NT systems, no distinction is made between the system#include
directories and the user#include
directives.-h and -?
- Provides help that explains the usage of the
genicf
command. No other action results.Example
This command creates the
emp.icf
file:genicf emp.idl
.
Synopsis
Compiles the Object Management Group (OMG) Interface Definition Language (IDL) file and generates the files required for the interface.
Syntax
idl [-i] [-Did[=value]] [-I pathname][-h] [-P] [-T] idl-filename...
[ icf-filename...]Description
Given the provided
idl-filename()
file(s) and optionalicf-filename()
file(s), theidl
command generates the following files:
idl-filename_c.cpp
- Client stub (includes embedded user-defined data type functions).
idl-filename_c.h
- Class definitions for interfaces.
idl-filename_s.cpp
- Server skeleton containing an implementation of the
POA_skeleton
classes.idl-filename_s.h
POA_skeleton
class definitions.idl-filename_i.cpp
- Example version of the implementation. This file is generated only when the
-i
option is given.idl-filename_i.h
- Class definition of an example implementation that inherits from the
POA_skeleton
class. This file is generated only when the-i
option is given.Note: If any ICF files are specified, the information within the ICF files is used to provide the code generator with information about the interface/implementations that override the defaults. Typically, an activation policy and a transaction policy for an implementation may be specified in the ICF file. If no ICF files are specified, default policies are in effect for all of the interfaces specified in the OMG IDL file, and skeleton code for all of the interfaces is generated. If an
icf-filename
is provided as input to theidl
command, only the implementation/interfaces specified in theicf-filename
are generated as part of the server. For information about ICF syntax, see "ICF Syntax" on page 2-2.The IDL compiler places the generated client stub information in the
filename_c.cpp
andfilename_c.h
files. The generated server skeleton information is placed in thefilename_s.cpp
andfilename_s.h
files.The IDL compiler overwrites the generated client stub files (
filename_c.cpp
andfilename_c.h
), and the generated server skeleton files (filename_s.cpp
andfilename_s.h
). Any previous versions are destroyed.When using the
-i
option, the IDL compiler overwrites the sample implementation class definition file (filename_i.h
). Previous versions are destroyed. The sample implementation file (filename_i.cpp
) is overwritten, however, any code contained within the code preservation blocks is preserved and restored in the newly generated file. To avoid the loss of data, it is recommended that you copy the sample implementation files (filename_i.h
andfilename_i.cpp
) to a safe location before regenerating these files.If an unknown option is passed to this command, the offending option and a usage message is displayed to the user, and the compile is not performed.
For more information about OMG IDL syntax, see Chapter 1, "OMG IDL Syntax".
Parameter
idl filename
The name of one or more files that contain OMG IDL statements. Options
-D identifier[=definition]
Performs the same function as the
#define C++
preprocessor directive; that is, the-D
option defines a token string or a macro to be substituted for every occurrence of a given identifier in the definition file. If a definition is not specified, the identifier is defined as 1. Multiple-D
options can be specified. White space between the-D
option and the name is optional.-I
pathname
- Specifies directories within which to search for include files, in addition to any directories specified with the
#include
OMG IDL preprocessor directive. Multiple directories can be specified by using multiple-I
options.There are two types of
#include
OMG IDL preprocessor directives:system
(for example,<a.idl>
) anduser
(for example,"a.idl"
). The path for system#include
directories is the system include directory and any directories specified with the-I
option. The path for user#include
directives is the location of the file containing the#include
directive, followed by the path specified for the system#include
directive.By default, the text in files included with an
#include
directive is not included in the client and server code that is generated.-i
- Results in
idl-filename_i.cpp
files being generated. These files contain example templates for the implementations that implement the interfaces specified in the OMG IDL file.Note: When using the
idl
command-i
option to update your implementation files, proceed as follows to update your implementation files:
- Back up your implementation files.
- Regenerate your edited implementation files (using the
idl
command with the-i
option).
-P
- Generates server code that uses the POA instead of the TP Framework. With this option specified, the skeleton class does not inherit from the TP Framework
Tobj_ServantBase
class, but instead inherits directly from thePortableServer::ServantBase
class. By default, the skeleton class uses the TP Framework. So you must use this switch when you are developing joint client/servers as these servers do not use the TP framework.- Not having the
Tobj_ServantBase
class in the inheritance tree for a servant means that the servant does not haveactivate_object
anddeactivate_object
methods. In WLE servers these methods are called by the TP Framework to dynamically initialize and save a servant's state before invoking a method on the servant. For WLE joint client/servers, user-written code must explicitly create a servant and initialize a servant's state; therefore, theTobj_ServantBase
operations are not needed. When using the-P
option, ICF files are not used because the TP Framework is not available.-T
- Generates tie-based servant code that allows the use of delegation to tie an instance of a C++ implementation class to the servant. This option allows classes that are not related to skeletons by inheritance to implement CORBA object operations. This option is set to off by default.
Note: When using tie classes with the Digital C++ V6.0 compiler for Tru64 UNIX, include the
-noimplicit_include
option in the definition of theCFLAGS
andCPPFLAGS
environment variables used by thebuildobjserver
command. This option prevents the Digital C++ compiler from automatically including the server skeleton definition file (_s.cpp
) everywhere the server skeleton header file (_s.h
) is included. This is necessary to avoid multiply-defined symbol errors. See Using DIGITAL C++ for Tru64 Unix Systems for additional information on using class templates (such as the tie classes) with Digital C++.- -h or -?
- Provides help that explains the usage of the
idl
command. No other action results.Examples
idl emp.idl
idl emp.idl emp.icf