java - How do Spring singleton beans work? -


we have backend application spring ioc jersey rest. spring beans define use default scope, mean, singleton.

this application db-centric huge number of users. question: how spring singleton beans manage concurrency on application? none of methods in service classes defined synchronized, never issues user data synchronization. looks ok.

i think missing spring singleton beans or how spring handles multiple requests singleton object.

as per understanding spring beans singletons , no service methods defined synchronized, there must synchronization issues multiple requests.

can me understand thing properly?

spring singletons in singleton in scope of spring container.

and if didn't have problem far because of implementation. when beans stateless there no concern concurrency.

concurrency concerns important when have statefull beans , changing state.when bean methods have own inputs function aurguments, there no concern anymore


Comments