BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Programming   |   Topic List   |   Previous   |   Next   |   Contents

   Programming a BEA Tuxedo Application Using C

Building Servers

To build an executable server, compile your application service subroutines with the BEA Tuxedo System server adaptor and all other referenced files using the buildserver(1) command.

Note: The BEA Tuxedo server adaptor accepts messages, dispatches work, and manages transactions (if transactions are enabled).

Use the following syntax for the buildserver command.

buildserver  -o filename -f filenames -l filenames -s -v

The following table describes the buildserver command-line options.

buildserver Command-Line Options

This Option . . .

Allows You to Specify the . . .

-o filename

Name of the executable output file. The default is a.out.

-f filenames

List of files that are link edited before the BEA Tuxedo system libraries. You can specify the -f option more than once, and multiple filenames for each occurrence of -f. If you specify a C program file (file.c), it is compiled before it is linked. You can specify other object files (file.o) separately, or in groups in an archive file (file.a).

-l filenames

List of files that are link edited after the BEA Tuxedo system libraries. You can specify the -l option more than once, and multiple filenames for each occurrence of -l. If you specify a C program file (file.c) , it is compiled before it is linked. You can specify other object files (file.o) separately, or in groups in an archive file (file.a).

-r filenames

List of resource manager access libraries that are link edited with the executable server. The application administrator is responsible for predefining all valid resource manager information in the $TUXDIR/updataobj/RM file using the buildtms(1) command. You can specify only one resource manager. Refer to Setting Up a BEA Tuxedo Application for more information.

-s [service:]function

Name of service or services offered by the server and the name of the function that performs each service. You can specify the -s option more than once, and multiple services for each occurrence of -s. The server uses the specified service names to advertise its services to clients.

Typically, you should assign the same name to both the service and the function that performs that service. Alternatively, you can specify any names. To assign names, use the following syntax: service:function

-t

Specifies that the server is coded in a thread-safe manner and may be booted as multithreaded if specified as such in the configuration file.

Note: The BEA Tuxedo libraries are linked in automatically. You do not need to specify the BEA Tuxedo library names on the command line.

The order in which you specify the library files to be link edited is significant: it depends on the order in which functions are called and which libraries contain references to those functions.

By default, the buildserver command invokes the UNIX cc command. You can specify an alternative compile command and set your own flags for the compile and link-edit phases, however, by setting the CC and CFLAGS environment variables, respectively. For more information, refer to Setting Environment Variables.

The following command processes the acct.o application file and creates a server called ACCT that contains two services: NEW_ACCT, which calls the OPEN_ACCT function, and CLOSE_ACCT, which calls a function of the same name.

buildserver -o ACCT -f acct.o -s NEW_ACCT:OPEN_ACCT -s CLOSE_ACCT

See Also