java - Differences between @AccessTimeout(value = 0) and @Lock(LockType.WRITE) -
As I read in the beginnings with java 7E :
@ lock (lock type.): The method associated with a special lock will not allow concurrent invoices until the resource is completed.
A @AccessTimeoutvalue of 0 indicates that concurrent access is not allowed. Due to this, due to throwing a concurrent admission failure, a customer will call a method that is currently being used.
So ... what's the difference? Both annotations disable the concurrent invitation and I do not get any difference. Is there any such situation when it is wise to use them together?
The first method will block the caller until his phone is currently over Second, @AccessTimeoutvalue are making more than one call at the same time, then will throw an exception. varies considerably.
Comments
Post a Comment