April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
BeanFactories
nBeanFactories are the heart of Spring
nLightweight container that loads bean definitions and manages your beans. Knows how to serve and manage a singleton or prototype defined bean
nResponsible for lifecycle methods.
nInjects dependencies into defined beans when served
nThe Factory Pattern: one object is responsible for creating and maintaining the lifecycle of another object.
nA BeanFactory is typically configured declaratively in an XML file, or files, with the root element: <beans>.  That file determine how beans can be referenced and wired together and contains one or more <bean> elements
nid (or name) attribute to identify the bean
nclass attribute to specify the fully qualified class
nBy default, beans are treated as singletons, but can also be prototypes