This is not necessarily the case.
The problem is to use solitary singles in separate JVMs if they share a significant state. For example, a singleton that has stored and issued incremental identifiers would be very dangerous if two separate instances existed on two separate application servers that were part of the same application.
There is nothing in Spring that makes this more or less complicated. Your Spring beans (probably services) should aim to maintain as small a state as practical, as a good practice. If they need to split the state, then you have to solve this problem as you would with any other common state.
Many people use Spring in clustered environments and do not encounter any problems related to the above. I am one of them!
source share