DevStop Command with Starter

Hi Team,

When calling "DevStop" command of Starter DS in Java, I need to perform few steps like persisting some data in database before the device server stops. Is this possible?
Regards,
TCS_GMRT
Hi TCS GMRT team,

The purpose of the Starter Device Server (DS) is to start, stop and report the status of the TANGO Device Servers. So if the question is whether the Starter DS can be used to persist some data in the database, then the answer is no. Obviously, it can be done by modifying the Starter code as per your needs, but I would suggest not doing it. Instead, before invoking DevStop Command of Starter DS, Database Device Server should be used to persist the information in the Database.

Vatsal Trivedi,
Hi TCS GMRT team,

What kind of data do you need to persist in the database?
Do you need this only when you stop a specific device server or do you need this when you stop any device servers?
If you need this only when stopping specific device servers, the best location to persist your data might be in your deleteDevice method which is invoked when the device server is stopped.

Cheers,
Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Hi TCS GMRT team,

I don't what do you want to perform.
But the problem is not linked to the DevStop command.
I guess you will have same behavior with Ctrl-C or kill command.
As Reynald suggests you must add code in deleteDevice method.

Cheers
Pascal
 
Register or login to create to post a reply.