How should SessionFactory instances be handled within (Spring MVC) web requests?

Viewed 644

This is a very basic question yet I need help. Suppose we make a singleton bean in spring, then spring ioc would make a single instance of that specific bean and when some sort of code needs it that would be injected.That's fine. But I am confused about how will it be managed by multi threading environment. Like if we make a sesssionFactory bean in spring as singleton then making many requests to a specific rest url which needs sessionFactory bean. How spring framework will provide that single instance of bean to that many requests.

1 Answers
Related