Results 1 to 1 of 1
Thread: How to define Bean Scope
How to define Bean Scope
The scope of the objects created from a particular bean definition can be defined. This gives the flexibility to choose the scope of the objects you create.
Spring Framework supports five scopes:
- Singleton: Only 1 instance of Bean will be there.
- Prototype: When Bean is called a new Instance will be created.
- Request: Single bean definition to the lifecycle of a single HTTP request; means every HTTP request will have its own instance of a bean created off the back of a single bean definition.
- ApplicationContext: Session Scopes a single bean definition to the lifecycle of a HTTP Session.
- Global session: Scopes a single bean definition to the lifecycle of a Global HTTP Session. Typically only valid when used in a port let context. Only valid for the context of web-aware Spring.
- By Java Tip in forum Java TipReplies: 0Last Post: 03-30-2008, 10:03 AM
- By sivasayanth in forum New To JavaReplies: 3Last Post: 01-14-2008, 05:13 AM
- By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:43 PM
- By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:36 PM
- By trill in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:32 AM