This chapter provides instructions for the following:
Introduction
The BEA TUXEDO system integrates the software into the Microsoft Visual C++ (msdev) environment and emulates the functionality of msdev when integration is not possible. This new feature makes it easier for you to develop BEA TUXEDO system enabled applications for 16-bit and 32-bit Windows operating systems. The BuildTuxedo system operates seamlessly on Windows 95 and all currently supported Windows NT environments (Intel and Alpha).
The coding required to create BEA TUXEDO service requests, send requests, set up conversational connections, and get replies is fundamentally the same in both UNIX and NT environments.
Refer to the following books for information on the BEA TUXEDO ATMI:
For More Information
BuildTuxedo
is a single tool, tightly integrated with the msdev
build environment, that developers can use instead of the buildserver
, buildclient
, and buildclt
commands. (Of course, the commands are still available for those who prefer to use them.)
Although the buildserver and buildclient commands are available on the Windows NT platform, there are differences between how the options to these commands work on NT platforms and non-NT platforms. The following table lists these differences.
Using the buildserver and buildclient Commands
To modify the build environment in an integrated development environment: (a) select Settings from the
Note:
To specify the library and include paths in an integrated development environment, select Options from the msdev Tools menu. From the Options dialog box, select the Directories tab.
msdev
Build menu, and then (b) select either the C/C++ or Link tab.
CC
and CFLAGS
are no longer needed.
Adding BuildTuxedo to the MSDEV Tools Menu
msdev
) graphical user interface (GUI), select
Tools
Note:
To modify an item, highlight it and type over it. To move any item, highlight it and select the up or down arrow at the top of the Menu Contents box.
BuildTuxedo maintains a separate project file in the current directory for each BEA TUXEDO application using it. When BuildTuxedo begins, it searches for a valid project file in the current directory. If one is found, the various dialog controls are set to the values stored in the file and the dialog is displayed. The title bar displays the following.
BuildTuxedo
<project name
>
Because your BuildTuxedo project is closely associated with the msdev project in the current directory, BuildTuxedo also searches for two other files:
msdev
make file (filename
.mak)
msdev
project file (filename
.mdp
, filename
.dsw
, or filename
.dsp
).
If BuildTuxedo cannot find one or both of these files, it displays a warning and/or fails to activate. If the directory contains multiple BuildTuxedo project files, multiple msdev project files or make files, menu items that contain appropriate target names are added to the System menu. To save the current project file, select OK or Apply. To cancel any changes that you made to the project file or any file that BEA TUXEDO maintains, select Cancel or press Esc.
Before you can build your BEA TUXEDO application in an IDE, you must set the following fundamental parameters in your environment:
Setting Up Your Environment
To provide this information, access the BuildTuxedo Project dialog box in the msdev
GUI.
How to Specify the Build Type, Header File, and Filename
Figure 4-2 BEA TUXEDO System for Windows NT Build Page
Select | Then |
---|---|
Server |
Enter information in the Initialization, Cleanup, and Entry Point fields. Then go to Step 3. |
Native Client or Workstation Client |
Go to Step 3. |
Note:
Windows 95 users can select Workstation Client type only.
Note:
The Initialization and Cleanup options allow you to override the default init/exit functions by specifying valid function names. The Entry Point option allows you to specify the name of the function that BuildTuxedo generates. You can then call this function from anywhere in the application.
stdafx.h
(the standard msdev//MFC
precompiled
header file.
In the Header File, BuildTuxedo adds the necessary pragma statements to build the current BEA TUXEDO project correctly. BuildTuxedo opens the file specified by Header File if the file is present; otherwise, it creates one. A section titled: "//Begin TUXEDO Section*****DO NOT EDIT*****" and ending with "//End TUXEDO Section" designates the area in the header file that BuildTuxedo maintains and into which pragma statements are written. If BuildTuxedo searches for and does not find this section, it appends the section to the end of the header file. Because all other text within the file remains unchanged, you can specify stdafx.h as the header file.
Note: If this is a new project and you select OK or Apply, you must select Files into Project from the msdev Insert menu. You then add the file generated by BuildTuxedo to the current project. You need to do this only for a new project or when you change the name of the C/C++ output file.
Two lists are used to maintain the service dispatch table. Function Names is a user-maintained list of functions that you can associate with a service. Service Names is a user-maintained list of the associated services. Generally, the service and the function that performs the service are represented by the same name: function x performs service x. In some cases, the function may have a different name from the service it performs. For example, in one case, function abc performs services, x, y, and z. In another case, the service name is not known until runtime.
Figure 4-3 BEA TUXEDO System for Windows NT Services Menu
You must specify any function associated with a service when you build the server. For any function associated with a service, you must specify the service, the appropriate prototype, a C linkage, a void return, and take a single TPSVCINFO
pointer parameter. To specify a function to which a service name can be mapped, you must add the function to the Function Name list. This information is required for the service dispatch table. (If you are using the buildserver command, you can provide this information with the -s
option. Refer to the BEA TUXEDO Programmer's Guide for details.)
Resources
page from the BuildTuxedo menu.
Note:
The Tuxedo Resource Manager field contains a list of BEA TUXEDO resource managers available on the system as defined in the
%TUXDIR%\udataobj\RM
file. If the file is not present, a default (NONE
) is displayed.
Figure 4-4 BEA TUXEDO System for Windows NT Resources Page
To debug a server that has not been booted, complete the following procedure. Use this procedure only if you have built the server application using the Debug configuration for your project.
tmboot -n -d 1 -s
<
servername
>
to display the command line options tmboot
uses to start
<servername
>.
Settings in
msdev
.
Note:
Because BEA TUXEDO libraries are not built with debugging information and source code is not provided, you will not be able to access the BEA TUXEDO code directly.
tmshutdown
at a Windows NT prompt.
Warning:
Do not select Debug
Note:
To debug a server that is already running, type Stop to stop the server as the BEA TUXEDO system may attempt to restart it.
msdev -p
nnn
at a Windows NT Command prompt, replacing nnn
with the server's process ID (represented by a decimal number).
If you need to develop a BEA TUXEDO application without Visual C++, use the buildserver
and buildclient
commands. To do this, specify the compiler and link options necessary to build a BEA TUXEDO application. Refer to Section 5 of the BEA TUXEDO Reference Manual, BEA TUXEDO Application Development Guide, and BEA TUXEDO Programmer's Guide for information on using these tools.
To build a debug version of your application using buildserver
or buildclient
, you must compile all source files with the /Zi
and /Od
options. The /Zi
option enables debugging; the /Od
option disables optimization. You may also need to define the _DEBUG
preprocessor directive. To complete the process, indicate the link option as follows:
-l"/link/debug:full/debugtype:both"
msdev
) environment, select
Tools
Two editors are available in this environment: the FML Table editor and the VIEW Table editor. The user interface for both editors is similar to a workbook in which you can work on multiple documents/views simultaneously. You can also edit multiple files of various types at the same time. Both editors closely resemble a Microsoft Excel spreadsheet with all its associated functionality:
Using the FML Table Editor
Accessing the FML Table Editor
Tuxdev
(%TUXDIR%\bin
).
Type tuxdev and press Enter.
The FML Table Editor illustrated in Figure 4-6 contains five columns: Name, Number, Type, Flag and Comment, with an unlimited number of rows. The following chart outlines the purpose of each column in the editor.
You can open new (unnamed) FML tables in which a blank grid is created for the table named "FML Tablex", where x is a value tracked by Multiple Document Interface (MFC) and incremented by one each time a new table is created. You can specify a name if and when the table is saved. You can also open an existing text file for editing. Unless otherwise specified, files are saved in the directory in which the file was opened in tabbed delimited format, with .FML appended to the end of the filename when applicable. You can compile this file to produce either a 16-bit or 32-bit FML header file.
Using the VIEW Table Editor
Accessing the VIEW Table Editor
Tuxdev
(%TUXDIR%\bin
). Type
tuxdev and press Enter.
The VIEW Table Editor illustrated in Figure 4-7 contains seven columns: CName, FBName, Type, Count, Flag, Size, and Null, with an unlimited number of rows.
You can enter comments in the CName column provided each begins with the required pound sign (#). Blank lines are also allowed. When a CName entry is not preceded by a pound sign and is not NULL
, the line is assumed to be an active table entry.
Note:
You must type You can open new (unnamed) view files in which a blank grid is created for the view, Viewx, where x is a value tracked by MFC and incremented by one each time you create a new view. You can specify a name if and when you save the view file. You can also edit an existing view file (either text or binary). Unless otherwise specified, files are saved in the directory where the file was opened in tabbed delimited format, with.v appended to the end of the filename when applicable. You can compile this file to produce either a 16- or 32-bit binary The Multiple Document Interface (MFC), as part of the basic framework, provides a multiple document architecture in which you can open documents and views, regardless of type, at the same time. Examples of this design are msdev, Excel, and Word. In BEA TUXEDO terms, you can open x number of FML tables and y number of VIEW Table files at any time, and then select to use any one of them. Documents look and feel like a workbook that contains tabs for each open document.
The following tables describe what information is validated in each column of the FML Table and VIEW Table editors.
VIEW
<table name>
in a row by itself in the CName column before the view information, and type END
in a row by itself in the CName column to end the view information. You can enter multiple views within the same file provided that each table entry is preceded by VIEW
<table name
> and followed by END
.
VIEW
and header files.
Working in Multiple Documents Simultaneously
How the Editors Validate Entries
The FML Table Editor