Stop AppServer when database shut down

Posted by Jagxx on 25-Oct-2012 08:31

Hello,

I would like to stop the AppServer (state-reset) when the database crashes. I think that the best way to do that is to manage it in the AppServer's "connect procedure". Right?

How can I check in 4GL if the database is connected ? And if the database is not connected, how can I stop the AppServer with a 4GL procedure ?

----------------------------------------------------

/* AppSrvConnProc.p */

DEFINE INPUT PARAMETER cUser AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER cPassword AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER cAppServerInfo AS CHARACTER NO-UNDO.

1. Test if the database is started

2. if not, stop the AppServer (or don't start the agent)

----------------------------------------------------

Thanks in advance

Jag

All Replies

Posted by Admin on 25-Oct-2012 08:38

Check for the CONNECTED function.

This thread is closed