I am talking about classic enterprise applications. Typically hosted in some kind of application-server or container. Nothing fancy, just entities, services, Presentation/UI and relational storage.
Whenever I see the synchronized
keyword (either on methods or for blocks) in such an application I get very suspicious.
In my opinion this is either a sign for not understanding basic architectural concepts (for instance that a domain model is not shared between several clients) or even worse a sign that the architecture is actually very botched.
Do you share my mindset here? Or am I completely off track? Do you have use cases where synchronization is actually necessary in a classic enterprise application?