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.
Similar Threads
-
How to use Inner bean definitions via nested bean elements
By Java Tip in forum Java TipReplies: 0Last Post: 03-30-2008, 10:03 AM -
What is an interface in the java? how to define
By sivasayanth in forum New To JavaReplies: 3Last Post: 01-14-2008, 04:13 AM -
How to define Bean Scope
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:43 PM -
How to use Inner bean definitions via nested bean elements
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:36 PM -
Help with define an integer field
By trill in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:32 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks