Saturday, October 30, 2010


BeanFactory or ApplicationContext?

Taken from Spring website

Users are sometimes unsure whether a BeanFactory or an ApplicationContext is best suited for use in a particular situation. A BeanFactory pretty much just instantiates and configures beans. AnApplicationContext also does that, and it provides the supporting infrastructure to enable lots of enterprise-specific features such as transactions and AOP.

In short, favor the use of an ApplicationContext.

(For the specific details behind this recommendation, see this section.)

No comments: