Hello Eric,
if I understand your posting then the Tamino behavior is perfectly ok.
There are two situations two be explained:
1st: Two transactions in session context (local transaction mode).
The first transaction performs an update. In terms of locks, it aquires an exclusive lock on the document to be updated. This lock will not be released before end of transaction.
The second transaction performs the same update. In terms of locks, it tries to acquire an exclusive lock on the same document, which is not immediately available. Therefore, this transaction waits until the first one terminates. Then the lock becomes available and the second transaction can continue. That means, you should also observe, that the second transaction hangs until the first one terminates.
What you see is not a “lost update” in terms of transaction theory but a sequential execution of two independent transactions.
Please note, within the local transaction mode the default behavior is waiting for locks that are not availabe.
2nd: One transaction in local transaction mode, a second transaction not in local transaction mode.
Again, the first transaction performs its update and acquires the exclusive lock on the document to be updated.
Again, the second transaction tries to perform the same update but cannot immediately acquire the required exclusive lock. Now, in global transaction mode, the system returns immediately with an error message, saying that the update was not successful because some resource (the document to be updated, in fact in your example it should be the doctype containing the document to be updated) could not be locked. The second transaction fails without having executed an update.
Please note, within global transaction mode the default behavior is NOT to wait for locks but return immediately with an error if a lock cannot be granted.
If needed it is possible in both cases to change the waiting/non-waiting behavior using the lockWait option.
Best regards,
Michael
#webMethods-Tamino-XML-Server-APIs#API-Management#webMethods