Accessing Contract Repository Objects

The Contract Repository is a database containing BEA TUXEDO client/server interface contracts. The Contract Repository can be shared among developers using BEA Builder products. In this case, both C++ Expert users and Active Expert users can access the same repository.

After you have logged on to the Contract Repository, the C++ Expert window displays:

You can browse through the contents of the Contract Repository and generate sample application code for modules you select.

Note: The Contract Repository is the source of the modules, interfaces, and operations that represent BEA TUXEDO service interface information-if the item is not in the Contract Repository, you cannot access it from the C++ Expert.
 

How Do I Modify Contract Repository Services?

You cannot use C++ Expert to edit or change the objects in the Contract Repository. If you need to add, remove, or otherwise make changes to the Contract Repository objects, you must use the BEA TUXEDO Builder Contract Repository Editor product. For more information on working with the Contract Repository, refer to the BEA TUXEDO Builder Contract Repository Online Help (see Where to Find Related Information).
 

Refreshing the Contract Repository View

You can reload the modules from the Contract Repository database at any time to ensure that the objects showing in your local view have the same definitions as the objects in the repository. For example, when someone uses the Contract Repository Editor to add, remove, or modify a module, interface, operation or parameter your local view of these objects does not reflect this change automatically. You must refresh your local view when this occurs.

To refresh the Contract Repository view, choose File->Refresh from the main menu, click the Refresh button on the toolbar, or press Ctrl+R. If any changes have been made to the Contract Repository, these changes will now be reflected in your Contract Repository tree view.
 

Contract Repository Tree View

The objects available in the Contract Repository are displayed in a tree view that allows you to browse through Contract Repository items by clicking on a node. The node expands the visible objects to show any sublevels. The Contract Repository tree view supports multiple selection of nodes.

Figure 2-1 shows the C++ Expert Main Window including its view of the Contract Repository tree. Table 2-1 describes the tree objects at each node level.

Figure 2-1 C++ Expert Main Window

Table 2-1 Tree Objects

Object Icon Description

Contract Repository

The root node. (C++ Expert only)

Module

A module is a group of one or more interfaces.

In the C++ Expert application, you can "validate" a previously generated module to see whether the module is in sync with the Contract Repository database. If the module is not in sync with the Contract Repository, it appears as a white "ghost" module after the validate check. (To validate a previously generated module, select the module on the Workstation view and choose Generate->Validate module.)

In the Active Expert, an out-of-date module is a module in the "Workstation View" that is out of synch with the corresponding source module in the Contract Repository database. This can happen when the repository definition for a module or any of its components is updated after you have registered a module in the Workstation View.

In the Active Expert application, out-of-date modules show up automatically when you open the Workstation Objects view. You can "refresh" an out-of-date module by choosing Tools->Refresh while the Workstation View is open.

Interface

Interfaces are a group of one or more operations. Each interface may be part of one or more modules.

Operation

Operations are implemented as TUXEDO services. Each operation may be part of one or more interfaces.

When an operation has been exported it shows in a green light. (Contract Repository Editor only)

Parameter

When elements are used in operations, they become parameters or arguments to the operation. Parameters contain additional information (beyond that in the corresponding element), such as passing mode, exception mode, etc.

A parameter is based on a single primary data type (e.g., short, float, char) or a struct.

The parameter attributes available are:

Struct

A struct is a group of previously defined elements. To use a struct as a parameter, define it as an element. Structs cannot be nested.

In the Active Expert and C++ Expert, structs are displayed as parameters that contain elements. (See icons and explanation for parameters in this table.)

Element

An element is based on a single primary data type (e.g., short, float, char) or a struct. An element can be used by itself as a parameter to one or more operations, as well as being a part of one or more struct types.


 

Attribute and Sample Application Code Panels

The Attribute Detail panel is located on the upper right panel of the Main Window and provides detailed information about the Contract Repository objects. The Sample Application Code panel displays sample code generated when an object is selected in the Contract Repository Tree View.

The following table describes what is displayed for each Contract Repository item.

.
Table 2-2 Attribute Display for Tree Objects

Selection Attribute Detail Panel Shows

Sample Application Code Panels Contain

Repository

Clear panel

Clear panel

Module

User ID, time and date for last update, and last generation time for the module

Clear panel

Interface

User ID, time and date for last update

Clear panel

Operation

Operation details and user ID, time and date for last update information

Generated code

Input Parameter

Parameter details and user ID, time and date for last update information

Clear panel

Output Parameter

Parameter details and user ID, time and date for last update information

Clear panel

Input/Output Parameter

Parameter details and user ID, time and date for last update information

Clear panel

No Access Parameter

No access

Clear panel

Structure

Structure details and user ID, time and date for last update information

Clear panel

Element

Element details and user ID, time and date for last update information

Clear panel

Multiple icons

Clear panel

Clear panel


 

Sample Code

The Sample Application Code panel at the bottom of the Main Window shows the sample code generated for the single object selected in the Tree View.

You can specify sample code options that control how the sample code is generated, and specify if transaction object code is generated. Advanced sample code options let you specify variable naming schemes. For information on setting sample code values, refer to help on Sample Code Settings and Parameter Name Prefix panel.
 

Sample Code Declarations and Usage

You can view sample code for an object in four different communication modes: Synchronous, Asynchronous, Forward, and Queue, corresponding to the types of service requests. As objects are selected in the C++ Expert GUI, sample code will be displayed. To view sample code for each communication mode, click on the tab at the bottom of the Sample Application Code window.

Table 2-3 Sample Code Modes

Mode Description

Synchronous

Requestor waits for a response

Asynchronous

Requestor does not wait for the response but will poll for it at a later time.

Forward

Request is sent on to another service that will complete the work and reply to the original requestor.

Queue

Request is deferred. The request is stored in a queue until communications can be completed.


 

Copying Sample Code

There are two ways to copy sample code: