Specifications

2-14 Point-of-Sale Administrator Guide
Setting the RMI Time-out for the JVM Under Linux
360Commerce has found it useful to change the RMI time-out for the JVM under Linux. To do this,
change the command that launches the JVM, adding the JVM flag
-
Dsun.rmi.transport.connectionTimeout=
<X>
where
<X>
represents the time-out period in milliseconds.
This tells the JVM to time out socket connections used by RMI after
X
milliseconds of inactivity. Linux
quickly notifies the JVM when a socket connection cannot be established. Linux is slow, however, to
notify the JVM when an open socket connection has been broken (around 15 minutes). By setting the
connection time-out low, you can cause the sockets to disconnect quickly after each RMI call, thereby
requiring a connect for each subsequent RMI call.
Setting the RMI Time-out for All Manager and Technician Calls
You can change the RMI time-out values for connections and reads in the
\360store\pos\bin\
comm.properties
file. The value for the following properties apply to all manager and technician calls,
unless overridden by a communication scheme for a specific call.
comm.connectTimeout -
Specifies how long to wait for a socket connection to succeed. The value is in
milliseconds.
comm.readTimeout -
Specifies how long to wait before a read times out. The value is in milliseconds.
This property causes the read to time out even if the socket is alive and well and transmitting data.
Setting the RMI Time-out for a Specific Technician
To set the time-out for a specific technician:
1. Edit the
\360store\pos\bin\comm.properties
file and the conduit script as follows:
a. Add a new communication scheme to the
\360store\pos\bin\comm.properties
file. The
following lines provide an example:
comm.rmi_longread.readTimeout=120000
comm.rmi_longread.connectTimeout=1000
These lines establish a new communication scheme called
rmi_longread
with a read time-out of
120 seconds and a connect time-out of one second (since the values are in milliseconds).
b. Add the following property to the appropriate technician definition in the conduit script:
<PROPERTY propname="commScheme" propvalue="rmi_longread"/>
This sets the communication time-outs for all managers that connect to this technician. A manager
who is sending a valet to this technician times out if the valet fails to complete within 120 seconds.
It only attempts to connect to the technician for 1 second before giving up.