|
INTERVIEW QUESTIONS
J2EE
SPRINGS
DETAILS
Question: What is the typical Bean life cycle in Spring Bean Factory Container ?
Answer: Bean life cycle in Spring Bean Factory Container is as follows:
*
The spring container finds the bean’s definition from the XML file and instantiates the bean. *
Using the dependency injection, spring populates all of the properties as specified in the bean definition *
If the bean implements the BeanNameAware interface, the factory calls setBeanName() passing the bean’s ID. *
If the bean implements the BeanFactoryAware interface, the factory calls setBeanFactory(), passing an instance of itself. *
If there are any BeanPostProcessors associated with the bean, their post- ProcessBeforeInitialization() methods will be called. *
If an init-method is specified for the bean, it will be called. *
Finally, if there are any BeanPostProcessors associated with the bean, their postProcessAfterInitialization() methods will be called.
|
|
|
Category |
Springs Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8337 users |
Added on |
9/23/2014 |
Views |
68844 |
Rate it! |
|
|
Question:
What is the typical Bean life cycle in Spring Bean Factory Container ?
Answer:
Bean life cycle in Spring Bean Factory Container is as follows:
*
The spring container finds the bean’s definition from the XML file and instantiates the bean. *
Using the dependency injection, spring populates all of the properties as specified in the bean definition *
If the bean implements the BeanNameAware interface, the factory calls setBeanName() passing the bean’s ID. *
If the bean implements the BeanFactoryAware interface, the factory calls setBeanFactory(), passing an instance of itself. *
If there are any BeanPostProcessors associated with the bean, their post- ProcessBeforeInitialization() methods will be called. *
If an init-method is specified for the bean, it will be called. *
Finally, if there are any BeanPostProcessors associated with the bean, their postProcessAfterInitialization() methods will be called. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How is a typical spring implementation look like ?
|
View Answer
|
|
What are the common implementations of the Application Context ?
|
View Answer
|
|
What is the difference between Bean Factory and Application Context ?
|
View Answer
|
|
What is Application Context?
|
View Answer
|
|
What is Bean Factory ?
|
View Answer
|
|
What are the types of Dependency Injection Spring supports?
|
View Answer
|
|
How many modules are there in Spring? What are they?
|
View Answer
|
|
What are features of Spring ?
|
View Answer
|
|
What are the advantages of Spring framework?
|
View Answer
|
|
What is Spring ?
|
View Answer
|
|
What are the benefits of IOC (Dependency Injection)?
|
View Answer
|
|
What are the different types of IOC (dependency injection) ?
|
View Answer
|
|
What is IOC (or Dependency Injection)?
|
View Answer
|
|
Explain about integration of spring with AspectJ?
|
View Answer
|
|
Explain about transaction management in spring?
|
View Answer
|
|
Explain about exception wrapping?
|
View Answer
|
|
Explain about the different ways in which Spring JDBC can help you?
|
View Answer
|
|
Explain the three different methods which are provided by the Namespace Handler interface?
|
View Answer
|
|
Explain about auto wire support?
|
View Answer
|
|
Explain about how to deploy applications using POJOs?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Springs Interview Questions & Answers - Exam Mode /
Learning Mode
|