Prev Next

Spring / Spring Beans

Different Spring Bean Scope.

1. singleton : Returns a single bean instance per Spring IOC container.(default scope)
2. prototype : Returns a new bean instance each time when requested.
3. request : Returns a single bean instance per HTTP request.
4. session : Returns a single bean instance per HTTP session.
5. global session : Return a single bean instance per global HTTP session and only valid when used in portlet context.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

What are Beans in Spring framework? What does a Spring Bean definition consists of? Different Spring Bean Scope. How do I provide beans configuration metadata to the Spring Container? How do I define the scope of a bean in spring framework? Describe the lifecycle of a Bean in Spring framework. Is a singleton bean thread safe in Spring Framework? Explain the important life-cycle methods of a bean in Spring framework. Explain inner beans in Spring framework? What are the limitations of autowiring in Spring framework? How do I inject java.util.Properties into a Spring Bean? Explain @Required annotation in Spring framework. Explain @autowired annotation in spring framework. How do I make autowired bean property as optional? What is @Resource annotation in Spring framework? How do I configure a bean in my spring application? What kind of exception does spring DAO classes throw? Explain the different ways to configure a Java class as Spring Bean. Difference between id and name attribute of <bean> element in a Spring configuration file. Is Spring Bean with singleton scope thread safe? Difference between @Resource and @Autowired in Spring framework. Explain lazy-init attribute of bean tag in Spring. Can we fetch the inner bean from spring container using its id, if an inner bean defines one? Explain Spring bean inheritance. What is Bean Definition Template in Spring framework? What is spring bean pure inheritance template? Can a spring bean tag with no id or name attribute be created? How do I inject value for a bean property of primitive type? Can spring bean autowire on primitive types? How do I create a stateful bean in Spring framework? Difference between request and prototype bean scope in spring? What is the role of a Spring bean configuration file? Explain Circular Dependency scenario in Spring. Spring Bean marked as abstract by abstract=true needs the corresponding java class be abstract ? Spring Bean: Specify particular implementation of collection in your bean definition. Spring bean: difference between stateless and stateful beans. Can I define spring bean twice with same name in different bean definition file? Can I define spring bean twice with the same bean id in same file? Explain JSR-250 annotation. What is primary annotation in Spring? How to get all the Spring beans implementing a specific interface? What are the attributes of Spring @Transactional annotation? When is a spring bean destroy-method being called? When is a Spring Singleton bean garbage collected? When is a prototype bean garbage collected? Explain BeanPostProcessor beans. Explain no autowiring mode in spring bean. How do you debug Spring configuration? What is component scan in Spring framework?
Show more question and Answers...

Spring Interview questions II

Comments & Discussions