You are not logged in.
Pages: 1
Hi!
I try to replace Datasnap (i'm afraid of what i read about it's performance and stability) with mormot. I use Datasnap only for the http communication (the SOA part). Do you have any advices for my migration?
I have just finished reading this post, where can i find the full source?
Thanks!
Offline
See https://github.com/synopse/mORMot/tree/ … %20Service
But interface-based services are much easier to work with.
See https://github.com/synopse/mORMot/tree/ … 20services
Offline
OK i rewrote my client and server to use interface-based services, it's very powerful.
I have a problem when i want to use on the server side my object wich implement the interface, it's TServiceCalculator in the demo. never be Created, when a method is calling by the client an AV occur because the constructor never be called. I tried different Instances life time (sicSingle, sicShared...) but it doesn't change anything. Is there something i must do to solve this?
Offline
Here my class on the server side :
TCollDbFunc = class(TInterfacedObject, IColleaguesFunc)
private
FDORMConfigCtrl: TDORMCtrl;
FLstCtrl: TListCtrl;
function GetAdvantagesList(ASession: TSession): TAdvantages;
public
constructor Create;
destructor Destroy; override;
function GetColleagues: string;
end;
When I call GetColleagues from the client, the constructor has never be called before so my nested object FDORMConfigCtrl is nil.
Offline
The framework has no knowledge of this static constructor.
Just inherit from TInterfacedObjectWithCustomCreate, and override the default virtual constructor.
As stated by the doc in http://synopse.info/files/html/Synopse% … #TITLE_407
Offline
Thank you it's working!
Offline
Pages: 1