This describes naming conventions, class hierarchies, the file names and directory structure of generated code and other issues relevant to understanding and using the Rose Expert API.
Member functions described in this section are generated by Rose Expert based on their description in the Rose Model, which are derived from BEA TUXEDO service definitions. This table shows the relationship between the BEA TUXEDO, Rose Model, and Rose Expert definitions.
The following table shows relationship between the BEA TUXEDO, the Rose Model and Rose Expert data types.
The architecture of the application generated by the Rose Expert is built around the Rose metamodel, shown below.
The Rose Expert uses the information from the Rose Model to generate C++ bindings for each item in the form of Service Request classes and Server Implementation classes. Those elements are mapped to C++ classes in this fashion:
Figure 4-1 Rose Metamodel
There are two types of classes supplied with the Rose Expert:
Rose Expert Classes and Naming Conventions
All of the classes supplied with the Rose Expert are contained in the BEATuxBldr namespace.
When we refer to a class with a derived name, the derived part is italicized and enumerated. For example, a Generated Server class takes it's name from the module where it is implemented and would be referred to as the
Naming Generated Classes
Module1Srv class or object.
This convention is used in the figures that follow and throughout this document.
The following diagram shows the hierarchy of classes within the BEATuxBldr namespace. Individual exception classes are shown in a separate diagram.
The following figure shows the exception class hierarchy:
All user defined, operation specific exceptions are sub-classes of All BEA TUXEDO errors are encapsulated in sub-classes of The server application can throw user-specified exceptions, which are relayed to the client application. Exceptions derived from Exceptions that are sub-classed from
Note:
In order make exception handling vendor-independent, the Rose Expert generates exception objects and throws them by a pointer to the object, rather than by value. Therefore, Rose Expert exceptions must be caught by the client application via pointer, rather than by reference. The client is also responsible for deleting them.
This section describes the files generated by the Rose Expert, and where they can be found.
The Rose Expert places its generated class header and source files,
The The The The The The The The The The The The The files listed below can be moved to the client platform so that client applications can request services defined in this interface:
The BEATuxBldr Namespace
Figure 4-2 BEATuxBldr namespace
Exception Classes
Figure 4-3 Exception Hierarchy, within the BEATuxBldr namespace
AppException.
TuxException. Errors relating to ATMI calls are encapsulated in AtmiException, and errors relating to FML buffer handling operations are encapsulated in FmlException. Client applications requesting a BEA TUXEDO service must be prepared to handle TuxException or handle AtmiException and FmlException individually, in addition to any user specified exceptions for the operations.
TuxException hierarchy are raised from the Rose Expert generated code and user programs are not expected to raise them on their own.
TransactionException are thrown by operations on Transaction. These exceptions correspond to the error codes returned by functions defined in the Tx Transaction Demarcation Specification. A brief text description of the exception is returned by the GetMessage member function of each class.
Generated Files
Directory Structure
make files and FML field table files in a directory structure determined by the name of the selected Component Package, individual modules and interfaces and the Rose Model contents. This structure descends from the project root directory, which is specified by the user on the Generation Settings window. A sample of this structures shown in the following figure:
Figure 4-4 Sample Directory Structure
ProjectRoot directory can be specified on the Generation Settings window.
ComponentPackage1.FML file contains the FML field table.
ComponentPackage1 directory contains all the generated files associated with all the modules in ComponentPackage1.
BEATuxBldr.h and BEATuxBldr.cpp files contain all classes and definitions supplied with the Rose Expert.
Module1.mak file contains the generated make declarations and targets for the servers and the test client.
Module1.h file contains the name space definitions that correspond to the module.
ComponentPackage1_tst.cpp file contains the code generated for the test client described in the Testing Default Service Implementations section.
Module1Srv.h and Module1Srv.cpp files contain the class definition and member functions used for server start-up, shut down and Resource Manager access. Default implementations of them are provided, but you can extend both the interface and the default implementation independently.
Interface1.h and Interface1.cpp files contains the class definition and member functions used for the remote object used by the client to access services.
Interface1Impl.h and Interface1Impl.h files contains the class definition and member functions used for implementing BEA TUXEDO services. The body of a member function is left blank, to be provided by the server application developer, when you do not choose to generate service test logic.
Interface1Skel.cpp file contains the global scope C++ function with C linkage used by the BEA TUXEDO framework.
Module1_Interface1.h and Module1_Interface1.cpp contains the class definition and member functions which is used as the base class for the Interface1 and Interface1Impl derived classes.
ComponentPackage1.fml
All the interfaces in a single module are contained in a single BEA TUXEDO server executable. When the Rose Expert generates code for the selected component package, a
Make files
make file is also generated. The name of the generated make file based on the Component Package name and the current platform:
| Platform | File name |
|---|---|
|
UNIX |
|
|
Windows NT |
|
The Resource Manager (if any) is specified in the BEABuilder tab for a task module in the Rose Model. (For information on specifying the resource manager, refer to BEABuilder Tab in Rose Component Specification for a Task Module.) The C++ compiler, and compilation flags used in the The Rose Model has Control Classes with operations and Structure Classes with attributes. The operation parameters and the Structure Class attributes can be mapped to FML fields. Using the BEA TUXEDO The This file is generated for the BEA TUXEDO Builder Configuration Expert and placed in the Each line of this text file contains information about the Resource Manager used by the server (if any), the name of the server executable and the module for which the server is constructed.
make file can be specified on the Makefile Settings window. The generated make file is placed in the directory created for each module.
FML Field Table File
mkfldhdr utility, a header file is generated from the field table file and used in all the generated server and client files.
make file has rules for compiling the files generated by the Rose Expert. Default rules are generated for compiling the user defined code in the implementation files (refer to Listing 4-4, Interface1Impl.h and Interface1Impl.cpp) and for building the servers. The user can edit the make file to customize it.
The gservers.lst File
ProjectRoot directory (see Figure 4-4 for a sample directory structure). The ProjectRoot directory can be specified on the Generation Settings window.