RTE 216 while closing DA-Server

RTE 216 while closing DA-Server

When shutting down my DA-server I get an RTE 216. Some debugging shows that it is caused by the ConnectionManager that is placed, as in the examples, on the serverdata-module. The connection manager is used by several service implementations. One of the services uses a per client factory. If the severdata-module is destroyed and some of my services are still alive, the following destroy of the service fails. I guess I’ve to shut down all running services when the serverdatamodule is destroyed. How can I do that?

Using: latest DA/RO - Delphi XE 10.2


Better to release connection when service method is finished.

However you can call TROPerClientClassFactory.TimeoutAllSessions.

ClientID for above method you can receive from SessionManager.GetAllSessions

Sounds good, but how to find the connection for that methode?


use DataService.Connection

where “DataSevice” is propety of?


DataService is usual data abstract service implementation:

TDataService = class(TDataAbstractService, IDataService)

IC - sometimes it is easy…
I’ll give it a try.

Success :slightly_smiling_face:


In the OnDeactivate eventhandler of the Service DM does the trick

1 Like