uCosminexus Service Platform, Overview

[Contents][Glossary][Index][Back][Next]

8.8.2 File access using the common folder

The common folder is used to store the commonly used files when multiple business processes reference a file, such as file transfer pattern from an FTP client to another FTP client.

Organization of this subsection
(1) Creating the common folder
(2) Accessing the common folder
(3) Defining the path corresponding to the common folder definition name
(4) Exclusive control of files in the common folder
(5) Deleting the common folder and the files in the common folder

(1) Creating the common folder

The user creates the common folder during system setup. You can use the created folder as the common folder by defining the folder as "name of common folder" in the HCSC server runtime definition file.

Note that you can create multiple common folders for one HCSC server.

(2) Accessing the common folder

The common folder can be accessed from all the business processes. However, the limitations are as follows:

(3) Defining the path corresponding to the common folder definition name

You can define multiple common folder definition names for the HCSC server.

For each common folder definition name, you must specify the full path indicating that common folder definition name. Code the common folder definition name in the common-folder-<common folder definition name> property of the HCSC server runtime definition.

For details on the HCSC server runtime definition file, see "HCSC server runtime definition file" in "Service Platform Reference Guide".

(4) Exclusive control of files in the common folder

To access the files in the common folder, obtain a file lock for both reading and writing.

(a) Lock types

In the access of files in the common folder, a shared lock is obtained for reading, and a dedicated lock is obtained for writing. The following table describes the possibility of locking a file when the current lock is a shared lock or dedicated lock. Note that another process indicates a process which is accessed by using the exclusive management APIs other than the locked process.

Table 8-26 Shared lock and dedicated lock

Current lock Re-lock from another process/ thread
Shared lock Dedicated lock
shared lock Y N
dedicated lock N N

Legend:
Y: Can be locked.
N: Cannot be locked.

(b) Parameters for obtaining locks

This subsection describes the following parameters that are used for obtaining the file lock:

Lock retry count
If the file lock has already been obtained by another process or thread, the file lock cannot be obtained. At this time, re-lock is tried only for the given lock retry count.

Lock retry interval
This is the time interval (seconds) from lock failure until the next lock acquisition attempt.

(5) Deleting the common folder and the files in the common folder

The user deletes the common folder. Delete the files in the common folder with the following methods:

For details on the method of using the delete operation of the file operations adapter, see "8.7.1 Operations supported by the file operations adapter".

For details on the method of using the commands for folder operations, see "5.4.22 Deleting files in the common folder" in "Service Platform System Setup and Operation Guide".