Data Modules On Asta Servers


 

To insure that ASTA servers thread properly, ASTA server side components must be deployed on a DataModule on the server. This allows for ASTA to create copies of the DataModule so that each user can have their unique version of it during Database work with a thread. This includes any Delphi 3rd Party Database components that you are using and Asta components with the exception of the AstaServerSocket and AstaSQLGenerator which should be kept on the mainform of the application as only one instance of each of these components are required for the server.

 

To use ASTA's server side components (ServerDataSets, TAstaProviders, TAstaBusinessObjectManagers) you must make a call to RegisterDataModule in the AstaServers FormCreate method. This allows ASTA to internally inventory server side components that that remote clients can be made aware as to what is available on the server. Additional data modules can be registered by using the AstaServerSockets.OnAddDataModule event.

 

Since ASTA servers can have any number of data modules, in order to support the proper threading of ASTA servers typically there will be ONE TDatabase (using BDE terminology) like component per data module and additional data modules will need to be initialized with their TDataSets set to this TDatabase. Use the OnAddDataModule to perform this initialization.

 



ASTA Overview Coding ASTA Servers DataSetToString