shareMode

Type: Integer

The shareMode property of the File class restricts access to the file by other processes. If another process has a conflicting lock, an exception is raised.

To reduce the number of messages sent between the application server and the presentation client when reading a static file (one that has the mode property set to Mode_Input) from the presentation client when running JADE in thin client mode, set the shareMode property to Share_Read or Share_Exclusive so that the file is read by the application server in chunks from the presentation client and the file buffer management is then performed by the application server.

The File class constants provided for shared file access modes are listed in the following table.

Constant Value Enables…
Share_Exclusive 3 The file to be opened for exclusive access, preventing another thread or process from opening the file concurrently
Share_Read 2 Another thread or process to open the file for read access
Share_Write 1 Another thread or process to open the file for write access
Share_ReadWrite 0 Another thread or process to open the file for read/write access (the default)