[
https://issues.apache.org/jira/browse/TRANSACTION-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eugene Tarasov updated TRANSACTION-41:
--------------------------------------
Affects Version/s: 1.1
> FileSequence returns the same id for two instances of the same application
> --------------------------------------------------------------------------
>
> Key: TRANSACTION-41
> URL: https://issues.apache.org/jira/browse/TRANSACTION-41
> Project: Commons Transaction
> Issue Type: Bug
> Affects Versions: 1.1, 1.2
> Environment: Any
> Reporter: Eugene Tarasov
> Priority: Minor
>
> Consider the next situation: Two instances of the same application have been
> started. And this application uses FileSequence to generate the ID for
> transactions. FileSequence does not use file locks when it performs
> read/write operations on files which hold IDs. So, the two instances of the
> same application potentialy can read the same value from files, which causes
> different problems. In most applications this never happen, because the
> probability of this is very low. But on highly loaded systems it happens
> sometimes.
> Possible solution - use file locks. FileSequence.nextSequenceValueBottom
> tries to get a lock on some file in the beginning. And then it releases lock
> before exit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira