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.
For seq-v.1() in FILE_OB_SEQBinding(), its scope is the EP0 identified by FILE_OB_SEQService() + tns:FILE_OB_SEQBinding()
For seq-v.1() in FILE_OB_SEQBinding1(), its scope is the EP1 identified by FILE_OB_SEQService1() + tns:FILE_OB_SEQBinding1()
The mapping of a sequence to a file system file is demonstrated in the WSDL file below.
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:
%{seq-v.1() in EP0 is persisted in the file: jfu-tecra\TEST_NETWORK_FILE\area_polled_EPO\filebc.seq\seq-v.1 %{seq-v.1}
%{seq-v.1() in EP1 is persisted in the file: jfu-tecra\TEST_NETWORK_FILE\area_polled_EP1\filebc.seq\seq-v.1 %{seq-v.1}
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.