RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSharedConnection Class

TSharedConnection connects to a child remote data module that is accessible only through the properties of a main remote data module on the application server.

Pascal
TSharedConnection = class(TCustomRemoteServer);
C++
class TSharedConnection : public TCustomRemoteServer;

MConnect

TSharedConnection manages a connection to a "child" remote data module that is managed by a single main remote data module on an application server. The client application does not connect directly to the "child" remote data module. Rather, it uses a single connection to the main remote data module on the server machine, and that main remote data module dispatches calls to the IAppServer interface of other "child" data modules. This allows the client application to use a single connection rather than one connection for each remote data module on the application server. 

On the server-side, the interface for the child remote data module is surfaced as a property of the main remote data module's interface. The TSharedConnection component uses this property name to indicate which child remote data module is the actual target of its connection. 

TSharedConnection uses a TDispatchConnection descendant (TDCOMConnection, TWebConnection, or TSocketConnection) to form the connection to the main remote data module on the application server. When you use TSharedConnection to open a connection, it causes the associated dispatch connection to connect to the main remote data module if it has not already done so. When you close the connection maintained by TSharedConnection, however, it severs only the connection to the child remote data module, leaving the connection to the main remote data module open in case other components on the client application are still using it. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!