Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . Drivers Guide - <b>lock time-outs</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Lock Time-outs
------------------------------------------------------------------------------

     Problem:  Index locking in previous versions of CA-Clipper was handled
     automatically by the database driver, and had no time-out provision.
     This created the potential for problems in network environments if a
     workstation died while holding a lock.  If this situation occurred all
     other workstations waiting for an index lock would appear to freeze
     while waiting to obtain their lock.  This could also happen if a user
     placed a CA-Clipper application in the background on a multitasking
     system without sufficient processing time allocated to it.  Eventually,
     most network operation systems would clear a connection that had no
     activity for a specified period of time.  This would free the lock and
     everything would resume as normal, but frustrated users may have
     rebooted their machines possibly causing file corruption.

     Solution:  In CA-Clipper 5.2 the NTX driver will generate a recoverable
     runtime error if it fails to lock the index after a predetermined number
     of retries.  The default error handler for this system simply returns
     (.T.) to retry the operation.  This emulates the behavior of previous
     CA-Clipper versions.

 Error Handling

     Time out handling:  The handling of this error is problematic because
     the lock is issued from various internal index routines.  Therefore the
     only safe recoveries are to retry or quit.  Choosing to default from the
     error or issuing a break will more than likely leave the index in a
     corrupted state.  If either of the options is employed, the application
     should immediately recreate the index.  The preferred way to handle a
     time out such as this is to alert the user of the situation so they
     don't think their machine has hung, and then have the network
     administrator determine what workstation is causing the problem.  When
     the problem workstation is cleared, the users that have timed out can
     select  retry and continue processing.

     NTXERR.PRG:  The file NTXERR.PRG contains the source code for the
     default error handler INIT procedure.  This error handler can be
     modified to allow user-defined error handling for index lock time-outs.
     Care should be exercised when modifying the error handler as detailed
     above.

     Compatibility:  The lock time-out capability when used in conjunction
     with the default error handler is totally compatibility with previous
     versions of CA-Clipper.  No changes are made to the NTX file structure
     and no action is required by the developer to activate the time-out
     functionality.


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson