|
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
buildobjclientcommand to construct a WLE client application. The command combines the files specified in the-fand-loptions 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
.cand.cppfiles are compiled in one invocation of the compilation system for the operating system in use. Users may specify the compiler to invoke by setting theCCenvironment variable to the name of the compiler. If theCCenvironment variable is not defined whenbuildobjclientis invoked, the default C++ language compile command for the operating system in use will be invoked to compile all.cand.cppfiles.Users may specify options to be passed to the compiler by setting the
CFLAGSor theCPPFLAGSenvironment variables. IfCFLAGSis not defined whenbuildobjclientis invoked, thebuildobjclientcommand uses the value ofCPPFLAGSif that variable is defined.Options
-v- Specifies that the
buildobjclientcommand 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, thetypewould be.EXE).-f firstfile-syntax- Specifies a file to be included first in the compile and link phases of the
buildobjclientcommand. 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
-foption may be specified multiple times.-l lastfile-syntax- Specifies a file to be included last in the compile and link phases of the
buildobjclientcommand. 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
-loption 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
Callbackswrapper 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-Pswitch should have been passed to the IDL compiler when generating the client. Usebuildobjserverto 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
buildobjclientcommand. 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
.cor.cppfile extensions. If not defined, the default C++ language compile command for the operating system in use will be invoked to compile all.cand.cppfiles.CFLAGS- Indicates any arguments that are passed as part of the compiler command line for any files with a
.cor.cppfile extensions. IfCFLAGSdoes not exist in thebuildobjclientcommand environment, thebuildobjclientcommand checks for theCPPFLAGSenvironment variable.CPPFLAGSNote: Arguments passed by the
CFLAGSenvironment variable take priority over theCPPFLAGSvariable.- Contains a set of arguments that are passed as part of the compiler command line for any files with a
.cor.cppfile extensions.- This is in addition to the command line option
"-I$(TUXDIR)/include"for UNIX systems or thecommand line option/I%TUXDIR%\includefor Windows NT systems, which is passed automatically by thebuildobjclientcommand. IfCPPFLAGSdoes not exist in thebuildobjclientcommand 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
buildobjclientcommand 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
buildobjservercommand to construct a WLE server application. The command combines the files specified in the-fand-loptions 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
.cand.cppfiles are compiled in one invocation of the compilation system for the operating system in use. Users may specify the compiler to invoke by setting theCCenvironment variable to the name of the compiler. If theCCenvironment variable is not defined whenbuildobjserveris invoked, the default C++ language compile command for the operating system in use will be invoked to compile all.cand.cppfiles.Users may specify options to be passed to the compiler by setting the
CFLAGSor theCPPFLAGSenvironment variables. IfCFLAGSis not defined whenbuildobjserveris invoked, thebuildobjservercommand uses the value ofCPPFLAGSif that variable is defined.Options
-v- Specifies that the
buildobjservercommand should work in verbose mode. In particular, it writes the compile command to its standard output.-oname- 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, thetypewould be.EXE).-f firstfile-syntax- Specifies a file to be included first in the compile and link phases of the
buildobjservercommand. 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
buildobjservercommand. 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
rmnamemust appear in the resource manager table located in$TUXDIR/udataobj/RMon UNIX systems or%TUXDIR%\udataobj\RMon Windows NT systems.- Each entry in this file is of the form
rmname:rmstructure_name:library_names.- Using the
rmnamevalue, the entry in$TUXDIR/udataobj/RMor%TUXDIR%\udataobj\RMautomatically includes the associated libraries for the resource manager and properly sets up the interface between the transaction manager and the resource manager. The valueTUXEDO/SQLincludes 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-roption is not specified, the default is to use the null resource manager.-h or -?- Provides help that explains the usage of the
buildobjservercommand. 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
.cor.cppfile extensions that are passed in through the-lor-foptions.CFLAGS- Specifies any arguments that are passed as part of the compiler command line for any files with
.cor.cppfile extensions. IfCFLAGSdoes not exist in thebuildobjservercommand environment, the buildobjserver command checks for theCPPFLAGSenvironment variable.CPPFLAGSNote: Arguments passed by the
CFLAGSenvironment variable take priority over theCPPFLAGSenvironment variable.- Contains a set of arguments that are passed as part of the compiler command line for any files with a
.cor.cppfile extensions.This is in addition to the command line option-I$(TUXDIR)/includefor UNIX systems or thecommand line option/I%TUXDIR%\includefor Windows NT systems, which is passed automatically by thebuildobjservercommand. IfCPPFLAGSdoes not exist in thebuildobjservercommand 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
buildobjservercommand 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.cppandemp_i.cpp files:
buildobjserver -r TUXEDO/SQL -o unobserved
-f "emp_s.cpp emp_i.cpp"The following example shows how to use the
CCandCFLAGSenvironment variables with thebuildobjservercommand. The example also shows how to link in the math library on UNIX systems using the Bourne or Korn shells using the-fand-lmoptions: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
buildobjservercommand 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 theidlcommand, theidlcommand 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-filenamespecified on the command line, but with a.icfextension.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
#defineC++ preprocessor directive; that is, the-Doption 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-Doptions can be specified. White space between the-Doption and the identifier is optional.-I pathname- Specifies directories within which to search for include files, in addition to any directories specified with the
#includeOMG IDL preprocessor directive. Multiple directories can be specified by using multiple-Ioptions.- There are two types of
#includeOMG IDL preprocessor directives: system (for example,<a.idl>) and user (for example,"a.idl"). On UNIX systems, the path for system#includedirectories is/usr/includeand any directories specified with the-Ioption; the path for user#includedirectives is the location of the file containing the#includedirective, followed by the path specified for the system#includedirective. On Windows NT systems, no distinction is made between the system#includedirectories and the user#includedirectives.-h and -?- Provides help that explains the usage of the
genicfcommand. No other action results.Example
This command creates the
emp.icffile: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), theidlcommand 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_skeletonclasses.idl-filename_s.hPOA_skeletonclass definitions.idl-filename_i.cpp- Example version of the implementation. This file is generated only when the
-ioption is given.idl-filename_i.h- Class definition of an example implementation that inherits from the
POA_skeletonclass. This file is generated only when the-ioption 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-filenameis provided as input to theidlcommand, only the implementation/interfaces specified in theicf-filenameare 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.cppandfilename_c.hfiles. The generated server skeleton information is placed in thefilename_s.cppandfilename_s.hfiles.The IDL compiler overwrites the generated client stub files (
filename_c.cppandfilename_c.h), and the generated server skeleton files (filename_s.cppandfilename_s.h). Any previous versions are destroyed.When using the
-ioption, 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.handfilename_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 filenameThe 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-Doption 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-Doptions can be specified. White space between the-Doption and the name is optional.-Ipathname- Specifies directories within which to search for include files, in addition to any directories specified with the
#includeOMG IDL preprocessor directive. Multiple directories can be specified by using multiple-Ioptions.There are two types of
#includeOMG IDL preprocessor directives:system(for example,<a.idl>) anduser(for example,"a.idl"). The path for system#includedirectories is the system include directory and any directories specified with the-Ioption. The path for user#includedirectives is the location of the file containing the#includedirective, followed by the path specified for the system#includedirective.By default, the text in files included with an
#includedirective is not included in the client and server code that is generated.-i- Results in
idl-filename_i.cppfiles being generated. These files contain example templates for the implementations that implement the interfaces specified in the OMG IDL file.Note: When using the
idlcommand-ioption 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
idlcommand with the-ioption).
-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_ServantBaseclass, but instead inherits directly from thePortableServer::ServantBaseclass. 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_ServantBaseclass in the inheritance tree for a servant means that the servant does not haveactivate_objectanddeactivate_objectmethods. 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_ServantBaseoperations are not needed. When using the-Poption, 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_includeoption in the definition of theCFLAGSandCPPFLAGSenvironment variables used by thebuildobjservercommand. 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
idlcommand. No other action results.Examples
idl emp.idl
idl emp.idl emp.icf