Defining C++ components

To define a C++ component, use EAServer Manager to create an Interface Definition Language (IDL) module and interface, assign the interface to the component, define the properties for the component, and then define the methods in the component. Define each method’s return type and parameters. For each parameter, define its datatype and argument mode.

Chapter 4, “Defining Components” describes how to define and configure new components in EAServer Manager.

Transaction property

The component’s transaction property determines how it participates in transactions. You can view and change this property using the Transactions tab of the component’s property sheet. For a description of each option on the Transactions tab, see “Component properties: Transactions”. A transaction consists of a number of database updates (which can be performed by multiple components) that are grouped into a single atomic unit of work.

For a full description of how EAServer handles transactions, see Chapter 2, “Understanding Transactions and Component Lifecycles.”

Instance properties

The threading property imposes constraints on the concurrent execution of the component in different threads. You can view and change these properties using the Threading tab of the component’s property sheet.

In single threading, multiple instances can exist simultaneously, but only one can be active at any one time. EAServer synchronizes instantiations, method invocations, and the destruction of all instances. Use single threading if your component shares volatile global data or stateful resources between instances.

This setting determines the constraints that are placed on the concurrent execution of different instances of the component. The following settings specify the constraints that are placed on concurrent execution of different instances of the component. The choices are:

Client interfaces

You define methods by specifying each method’s return type and parameters. For each parameter, you define its datatype and argument mode. You use a method’s property sheet to define its return type and parameters.

Chapter 5, “Defining Component Interfaces” describes how to define IDL methods in the component interface. “Supported datatypes” describes the IDL to C++ type mappings.

Instead of defining methods using EAServer Manager, you can code a Java interface that defines your component’s methods and import it into EAServer Manager. See “Importing interfaces from compiled Java files” for more information.

Control interface

Optionally configure a control interface for the component. Using a control interface allows you to implement methods to respond to changes in the instance lifecycle. See “Configuring a control interface” for more information.