I have a table that I need to make sure is updated in a transactionally clean fashion. Meaning only one client can update it at a time.
Usually I do this using SQL transactions and it works fine (other then the potential for long lived database locks in certain circumstances) but I am now thinking 'hey, wouldn't a syncronized routine do this just as well?'
So, the question is, whats the better approach from a performance standpoint? This is probably a religious question to a certain extent but I'm interested in opinions on it.
Tx
Usually I do this using SQL transactions and it works fine (other then the potential for long lived database locks in certain circumstances) but I am now thinking 'hey, wouldn't a syncronized routine do this just as well?'
So, the question is, whats the better approach from a performance standpoint? This is probably a religious question to a certain extent but I'm interested in opinions on it.
Tx