Setting a call time-out programmatically

Note

You must explicitly create a connection with the connect() method to use setxfCallTimeout().

Use the setxfCallTimeout() method to set the call time-out value in seconds. The call time-out measures the length of time that the Java client waits for a return from a remote call to xfServerPlus. (This is ‘C’ in figure 1.) This time-out is measured for each send–receive request between the client and xfServerPlus. The default value is 1800 seconds (30 minutes).

1. xfNetLink time-outs.

The call time-out can also be set in the xfNetLink Java properties file with xf_SessionLingerTimeout. Using the setxfCallTimeout() method enables you to change the properties file setting after the object has been instantiated. Once the call time-out value has been set with setxfCallTimeout(), it will continue to be used for all subsequent calls in the current session until it is reset with another invocation of this method.

Note

When using pooling, if setxfCallTimeout() is called on an object, when the object is returned to the pool, the time-out will be reset to the xf_SessionLingerTimeout value (if specified) or to the default of 1800 seconds.

If you are using shared connections, you can call this method on any object that is sharing the connection, and it will affect all objects that share that connection.

For example, to set the call time-out to 10 minutes, use

AppLogin appLog = new AppLogin();
appLog.setxfCallTimeout(600);

For information on specifying a call time-out value in the properties file, see Call time-out. To set a call time-out value for xfServerPlus, see SET_XFPL_TIMEOUT.

Note

When you use Java connection pooling, there is a special call time-out that applies only to the pooling support methods. See Specifying pool time-out values.