Take the 2-minute tour ×  In my Spring-MMVC application,  I have
a xx-servlet.xml corresponding to my dispatcher servlet- Defines
my web layer beans/classes and importing another context.xml
which defines all persistence layer bean/services.  In xx-
servlet.xml,  have defined a ApplicationContextProvider class
which implements ApplicationcontextAware interface.  and have
annotated all my beans (presentation objects) with @Component
and when needed getting the instance of these beans from
ApplicationContext (not using WebApplicationContext).  So, in
this case what would be the scope of my beans?  Also, What would
be the case if I use WebApplicationContext?  What would be the
best practice... use ApplicationContext or
WebApplicationContext?  share|improve this question add comment
1 Answer  up vote 1 down vote accepted  WebApplicationContext
adds more scopes (request, session, globalSession) to the
standard Application context (which only provides Singleton and
Prototype scopes). If you do not specify a bean sc