I am talking about classic enterprise applications. It is usually located in some server application or container. Nothing unusual, just entities, services, presentation / user interface and relational storage.
Whenever I see the synchronized (or methods or blocks) in such an application, I become very suspicious. In my opinion, this is either a sign of a lack of understanding of basic architectural concepts (for example, that the domain model is not shared among several clients), or an even worse sign that the architecture is actually very unsuccessful.
Do you share my thinking here? Or am I completely unaware? Do you have cases when synchronization is really necessary in a classic enterprise application?
source share