Question

Is application context you load from .xml file is user specific level or application level, like context is once loaded for all the user? or every user has separate application context?

while using spring framework in java?

Was it helpful?

Solution

The context is application-wide, but individual beans can have narrower scopes.

The most common scopes are

  • singleton (default: one per application)
  • prototype (a new bean is created each time one is requested)
  • request (one bean per HTTP request)
  • session (one bean per HTTP session)

Obviously, the latter two types are user-specific beans.

Reference:

OTHER TIPS

It's application-specific, it applies to the entire application.

The application context is application level. It doesn't really make sense to talk about it as being tied to users.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top