![]() |
![]() |
![]() |
![]() |
![]() |
The following sections describe how to develop ATMI application clients and/or servers in the Microsoft Visual C++ Integrated Development Environment (msdev) on a Windows XP, or Windows Server 2003 system:Oracle Tuxedo ATMI integrates into the Microsoft Visual C++.Net IDE (msdev) and emulates the functionality of msdev when integration is not possible. This integration makes it easier for you to develop Oracle Tuxedo ATMI applications for 16-bit and 32-bit Windows operating systems.The coding required to create Oracle Tuxedo ATMI service requests, send requests, set up conversational connections, and get replies is fundamentally the same in both UNIX and Windows Server 2003 environments. BuildTuxedo and TUXDEV are tools that help you in your development environment.
• 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, these commands are still available for those who prefer to use them.) The BuildTuxedo system operates seamlessly on all currently supported Windows environments.
• TUXDEV allows you to create, edit, and compile multiple 16/32-bit FML tables and multiple 16/32-bit VIEW files. It also uses Multiple Document Interface (MDI) architecture so that you can use multiple views of these file types simultaneously.Both the buildclient() and buildserver() commands are available to Windows Server 2003 but not to Windows XP. Only the buildclient() command is available to Windows XP, meaning that only Tuxedo application clients can be built on a Windows XP system. For more information about the build commands, see buildclient(1)and buildserver(1)in Oracle Tuxedo Command Reference.There are differences between how the options to the buildclient() and buildserver() commands work on non-integrated development environments and on integrated development environments, as indicated in the following table.
All options are displayed on tabs by default. (The -v option is unnecessary and unsupported.) -o (output_filename)
1. Select Settings from the msdev Build menu.
1. Select Settings from the msdev Build menu.
1. Select Project from the msdev menu.
1. Access the BuildTuxedo GUI.
2. Access the BuildTuxedo Test window and select the Resources tab.
1. Access the BuildTuxedo GUI.
2. Access the BuildTuxedo Test window and select the Services tab.
1. Choose Settings from the msdev Project menu.To add BuildTuxedo to the MSDEV Tools menu, follow these steps:
1. In the Microsoft Visual C++.Net IDE (msdev) graphical user interface (GUI), choose Tools → External Tools. The External Tools window displays.Figure 3‑1 External Tools Window
3. In the Title field of the External Tools page, type &BuildTuxedo in the empty field.
Note: To enable a letter key as a hot key, put an ampersand (&) before the appropriate letter.
4.
•
• To the right of the Command field, click the ellipsis button, browse to the desired directory, select buildtuxedo.exe, and click Open. The selected pathname appears in the External Tools window.
5. In the Initial directory field of the External Tools page, click the right arrow button to display a pop-up menu. In the pop-up menu, choose Project Directory ($(ProjectDir)).BuildTuxedo is now part of the MSDEV Tools menu.BuildTuxedo maintains a separate project file in the current directory for each Oracle Tuxedo ATMI 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 information:BuildTuxedo project_nameBecause your BuildTuxedo project is closely associated with the msdev project in the current directory, BuildTuxedo also searches for two other files:
•
• If BuildTuxedo cannot find either of these files, it displays a warning and/or fails to activate. If the directory contains multiple BuildTuxedo project files, or multiple msdev project files or make files, menu items that contain appropriate target names are added to the System menu.Figure 3‑2 Build Page
2.
•
Native Client or Workstation Client 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 generated by BuildTuxedo. After specifying its name, you can call the function from anywhere in the application.
3.
4. In the header file, BuildTuxedo adds the necessary pragma statements to build the current Oracle Tuxedo ATMI project correctly. BuildTuxedo opens the file specified in the Header File field of the Build page, if the file is present; otherwise, it creates a new one. A section starting with:designates the area in the header file in which pragma statements are written. This area is maintained by BuildTuxedo. If BuildTuxedo does not locate this section in the file, it appends it 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 your project is new, 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.Figure 3‑3 Services PageGenerally, the service and the function that performs the service are represented by the same name. For example, 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 may not be known until run time.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 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.
Note: If you are using the buildserver(1)command, you can provide this information with the -s option. For more information about the -s option, see Programming an Oracle Tuxedo ATMI Application Using C or Programming an Oracle Tuxedo ATMI Application Using COBOL.
1. Select the Resources tab in the BuildTuxedo window to display the Resources page.Figure 3‑4 Resources Page
Note: The Tuxedo Resource Manager field contains a list of Oracle 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.
1. At any Windows command prompt, type tmboot -n -d 1 -s servername to display the command-line options used by tmboot(1)to start servername.
2. Execute the tmboot -M command to boot the BBL. (If necessary, boot additional application servers or machines.)
3.
6. To end the debugging session, type tmshutdown at any Windows command prompt.
WARNING: Do not stop the server by selecting Debug → Stop; the Oracle Tuxedo system may subsequently attempt to restart the server.
Note: To debug a server that is already running, type msdev -p nnn at any Windows command prompt, replacing nnn with the server’s process ID (represented by a decimal number).If you must develop an Oracle Tuxedo ATMI application using the command line instead of the Microsoft Visual C++ IDE GUI, use the buildserver(1)and buildclient(1)commands. To do this, specify the compiler and link options necessary to build an Oracle Tuxedo ATMI application. For information about using these tools, see the following documents:To build a debug version of your ATMI 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. In addition, you may need to define the _DEBUG preprocessor directive. To complete the process, indicate the link option as follows:To install the Tuxdev application, follow these steps:
1. In the Microsoft Visual C++.Net IDE (msdev) graphical user interface (GUI), choose Tools → External Tools. The External Tools window displays.
3. In the Title field of the External Tools page, type &Tuxdev in the empty field.
Note: To enable a letter key as a hot key, put an ampersand (&) before the appropriate letter.
4.
•
• To the right of the Command field, click the ellipsis button, browse to the desired directory, select tuxdev.exe, and click Open. The selected pathname appears in the External Tools window.
6. In the Initial directory field of the External Tools page, click the right arrow button to display a pop-up menu. In the pop-up menu, choose Project Directory ($(ProjectDir)).Tuxdev is now part of the MSDEV Tools menu.
1.
2. Type tuxdev and press Enter to display the Oracle Tuxedo Developer window.
1. In the Oracle Tuxedo Developer window, choose File→New. The New window appears, as shown in the figure titled “New Window” on page 3‑15.
2. Select the file (FML filenames include a .fml extension) to edit.Figure 3‑5 New Window
4. In the New window, select FML Table and type the name of the new file in the File Name field.Figure 3‑6 FML Table EditorTable 3‑2 describes the purpose of each column in the FML Table Editor.
Table 3‑2 FML Table Editor Column Description You can open new (unnamed) FML tables. A blank grid is created for the table named FML Tablex, where x is a value tracked by the MDI 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.
1.
2. Type tuxdev and press Enter to display the Oracle Tuxedo Developer window.
Table 3‑3 Using the View Table Editor Actions
1. In the Oracle Tuxedo Developer window select File→New to display the New window, as shown in the figure titled “New Window” on page 3‑15.
2. Select the file (FML filenames include a .fml extension) to edit.
4. In the New window, select VIEW Table and type the name of the new file in the File Name field.Figure 3‑7 VIEW Table EditorTable 3‑4 describes the purpose of each column in the VIEW Table Editor.
Table 3‑4 VIEW Table Editor Column Description Specify the [field in the] fielded buffer; this name is displayed in the field table file. Indicate the size of the member if the type is string, carray, or dec_t. Otherwise, you can specify ‘-’, and the view compiler computes the size.
Note: The information must appear in the CName column in a row by itself. You can enter multiple views within the same file, provided that each table entry is preceded by VIEW table_name and followed by END.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 the MDI 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 in which the file was opened in tabbed delimited format, with .v appended to the filename when applicable. You can compile this file to produce either 16- or 32-bit binary VIEW and header files.The MDI, 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 Oracle Tuxedo terms, you can open x number of FML tables and y number of VIEW Table files at any time, and then use any one of them. Each document looks and feels like a workbook that contains tabs for each open document.Table 3‑5 describes the information that is validated in each column of the FML Table Editor.
Table 3‑6 describes the information that is validated in each column of the VIEW Table Editor.
Entries are not validated. Entries are not validated. Entries are not validated.