Close
« Tutorial

Spring MVC - Session Scoped Beans MCQ

0/13
0 ✓
0 ✗

1. Which bean scope creates one bean instance for each HTTP session?

2. Which web scopes can be used for objects injected into a Spring MVC controller?

3. How long does a session scoped bean stay alive?

4. Where does Spring keep a session scoped bean?

5. Which annotation makes a bean definition session scoped?

6. When does Spring call the factory method of a session scoped bean?

7. Two different users visit a web application at the same time. How many instances of a session scoped bean are used?

8. One user sends many requests in the same HTTP session. Which instance of a session scoped bean is used?

9. What is the problem when a session scoped bean is injected directly into a singleton controller?

10. Which approach helps a singleton controller to get the correct session scoped bean?

11. A controller calls get() on a Provider<T> of a session scoped bean several times during the same session. What does it return?

12. Which of these is another way to work with session data in a Spring MVC controller?

Join