Timing Out a JADE Thin Client Connection

Use the ConnectionTimeout parameter of the JADE initialization file [JadeAppServer] section to specify the maximum number of minutes that the application server waits for activity (messages sent by or received) from any application attached to the server before the application session times out.

Notification and timer traffic is ignored when determining if the connection has timed out. The default value of zero (0) indicates that there is no timeout. If no activity occurs within the specified time, the application terminates and the following message is displayed in a message box on the presentation client.

The Current Application Session timed out

In addition, if the EnableAppRestrictions parameter in the [JadeAppServer] section is set to true, you can use the AllowSchemaAndApp<n> parameter to specify a timeout period for a specific schema and optional application, by using the following parameter syntax.

AllowSchemaAndApp<number> = schema-name [, application-name], timeout-value

The following example shows the timeout value in the MyApp application in the MySchema schema set to 30 minutes.

[JadeAppServer]
ConnectionTimeout     = 0
EnableAppRestrictions = true
AllowSchemaAndApp1    = JadeSchema
AllowSchemaAndApp2    = MySchema, MyApp, 30

This example allows all JadeSchema applications to be run without any timeout and the MyApp application in the MySchema schema to time out if no activity occurs within 30 minutes.

You can set the app.setInactiveTimeoutPeriod method, which results in the app.inactiveTimeout method being called when the inactive period has expired. This then allows your user logic to perform whatever is required, including a terminate, which allows a graceful exit.

When an application times out (that is, the period specified in the ConnectionTimeout parameter of the JADE initialization file [JadeAppServer] section elapses without activity), the equivalent of a monitor force off is performed, closing all forms and signing off without calling any methods.

The application server issues a test to determine if each thin client connection is still valid after 10 minutes of inactivity. If the connection is not available, the application server terminates that connection. (See also the note under "Controlling JADE Thin Client Application Execution", in the previous section.)