Using the File Binding Component in a Project

Mapping Persisted Sequences to File Based Persistences

A file is used as the persistence storage of sequences. For a File Binding Component service, as defined in a WSDL, the scope of the sequences are the endpoints associated with the bindings that contain the references to these sequences. As displayed in the following WSDL, there are two bindings which reference sequences by the name seq-v.1.

The mapping of a sequence to a file system file is demonstrated in the WSDL file below.

Mapping of a Sequence to a File System

In this example, %{se-v.1}() gives reference to a different sequence number when it appears in different bindings.

The persisted storage for a sequence is a file with the same name under the directory specified by the file:address->fileDirectory of the corresponding service binding.

For example, in the above WSDL, the persisted files are:

Initial Value of a Persisted Sequence

The initial value of a persisted sequence is 0. The value is then incremented by 1 every time that sequence is referenced. To create a sequence the starts with a number that is greater than zero, edit the start value in the persisted storage file when the file is not in use.

Concurrence Control of Access to the Sequence Storage File

Access to a specific sequence in persistence storage file is thread and clustering safe. This means that the file is read and updated by a single thread across clustered servers and JVMs, this can be on one host or multiple hosts.