Remote Data Module Wizard

From RAD Studio
Jump to: navigation, search

Go Up to File Menu

File > New > Other > Multitier > Remote Data Module

Use the Remote Data Module wizard to create a data module that can be accessed remotely as a dual-interface Automation server. A remote data module resides in the application server between a client and a server in a multi-tiered database environment.

Note: The Multitier page is available after you create an ActiveX Library, which is required for a remote data module.


Item Description

CoClass Name

Enter the base name for the Automation interface of your remote data module. The class name for your remote data module (a descendant of TRemoteDataModule) will be this name with a T prepended. It will implement an interface named using this base name with an I prepended. To enable a client application to access this interface, set the ServerName property of the client application's connection component to the base name you specify here.

Description

Enter the text that appears in the registry next to the ProgID for the application server interface. This text also acts as a help string for the interface in the type library.

Threading Model

Use the threading combo box to indicate how client calls are passed to your remote data module's interface. The following table lists the possible values:

Value Meaning

Single

The data module only receives one client request at a time. Because all client requests are serialized by COM, you do not need to deal with threading issues.

Apartment

Each instance of your remote data module services one request at a time. However, the DLL may handle multiple requests on separate threads if it creates multiple COM objects. Instance data is safe, but you must guard against thread conflicts on global memory.

Free

Your remote data module instances can receive simultaneous client requests on several threads. You must protect instance data as well as global memory against thread conflicts. This is the recommended model when using ADO datasets.

Both

The same as Free, except that all callbacks to client interfaces are serialized.

Neutral

Multiple clients can call the remote data module on different threads at the same time, but COM ensures that there is no conflict between two calls. You must guard against thread conflicts involving global data and any instance data that is accessed by multiple interface methods. This model is only available under COM+. Otherwise, it is mapped to the Apartment model.

Instancing

Use the instancing combo box to indicate how your remote data module application is launched. The following table lists the possible values:

Value Meaning

Internal

The remote data module is created in an in-process server. Choose this option when creating a remote data module as part of an active library (DLL).

Single Instance

Only a single instance of the remote data module is created for each executable. Each client connection launches its own instance of the executable. The remote data module instance is therefore dedicated to a single client.

Multiple Instance

A single instance of the application (process) instantiates all remote data modules created for clients. Each remote data module is dedicated to a single client connection, but they all share the same process space.

Generate Event Support Code

Check this box to tell the wizard to implement a separate interface for managing events.

See Also