DVM_AVAILABLE
The DVM_AVAILABLE
element specifies the interval of time (timeout) that the Genero
Application Server (GAS) allows for the DVM to start. The GAS declares a timeout when this pre-defined interval passes
without the DVM starting.
Syntax
<DVM_AVAILABLE>seconds</DVM_AVAILABLE>
- seconds specifies the interval of time (in seconds) allowed for the DVM to start. If not specified, the default timeout is 10 seconds.
Child elements
There are no child elements.
Usage
Use this element to configure a timeout mechanism to handle the failure of the DVM to start. If the DVM has not
started by the time the DVM_AVAILABLE
timeout expires, the GAS
sends an error message to the front-end and logs the message: DVM_AVAILABLE timeout
expired
You might consider setting a timeout longer than 10 seconds to ensure it is not triggered too soon; however, 10 seconds is considered a long time to establish a connection. If a DVM does not connect within that time, it means there is an issue and increasing the timeout will only delay the response. Keep this in mind if you decide to increase the timeout; otherwise, use the default setting.
<DVM_AVAILABLE>10</DVM_AVAILABLE>
- Web applications
-
When used as a child of the
WEB_APPLICATION_TIMEOUT_COMPONENT
element, theDVM_AVAILABLE
timeout is only applicable when you start an application or you launch a sub process in interactive mode (IN LINE MODE
). If you run the sub process in the background (IN FORM MODE
), theDVM_AVAILABLE
timeout is not applicable. - Web services
-
For a web service, there is no concept of a front-end; therefore, an error message is not sent. In addition, a web service is not expected to perform
RUN
commands with new DVMs connecting by themselves.A slow database connection, for instance taking up to 10 seconds to reply, may trigger the DVM timeout. Therefore, ensure you start the service DVM before performing database operations. In the code sample, the call to start the service is performed before connecting to the database.IMPORT com IMPORT FGL myservice MAIN CALL com.WebServiceEngine.RegisterRestService("myservice", "MyService") CALL com.WebServiceEngine.Start() DISPLAY "Server started" CONNECT TO "test1.db+driver='dbmsqt'" # ... END
For more information on working with web services, see the Web services pages of the Genero Business Development Language User Guide.