Spring Framework MVC "concurrency"?
concurrency, spring, spring-mvc
Solution
Yes, these objects would be accessed concurrently. So they must be coded in a thread-safe way. But this is trivial to do, since they're usually stateless, except for their dependencies which are injected at startup time by Spring.
Problem
AFAIK, Spring beans (version 3 and above), if not specified, all are singletons. So, my concern is, for example, when using `@Repository` (in classes that access database resources) or `@Service` (in classes that perform validations and business logic), these objects would be available to all of the users in the application in case accessed concurrently? Thanks in advance...