Definition Type: Attribute
Name: scope
Namespace: http://www.springframework.org/schema/beans
Type: string:http://www.w3.org/2001/XMLSchema
Containing Schema: spring-beans-3.1.xsd
Use (Optional)
Documentation:
The scope of this bean: typically "singleton" (one shared instance, which will be returned by all calls to getBean with the given id), or "prototype" (independent instance resulting from each call to getBean). By default, a bean will be a singleton, unless the bean has a parent bean definition in which case it will inherit the parent's scope. Singletons are most commonly used, and are ideal for multi-threaded service objects. Further scopes, such as "request" or "session", might be supported by extended bean factories (e.g. in a web environment). Inner bean definitions inherit the singleton status of their containing bean definition, unless explicitly specified: The inner bean will be a singleton if the containing bean is a singleton, and a prototype if the containing bean has any other scope.
Collapse XSD Schema Diagram:
XSD Diagram of scope in schema spring-beans-3_1_xsd (Membrane Service Proxy)
Collapse XSD Schema Code:
<xsd:attribute name="scope" type="xsd:string">
    <xsd:annotation>
        <xsd:documentation><![CDATA[
	The scope of this bean: typically "singleton" (one shared instance,
	which will be returned by all calls to getBean with the given id), or
	"prototype" (independent instance resulting from each call to getBean).

	By default, a bean will be a singleton, unless the bean has a parent
	bean definition in which case it will inherit the parent's scope.

	Singletons are most commonly used, and are ideal for multi-threaded
	service objects. Further scopes, such as "request" or "session", might
	be supported by extended bean factories (e.g. in a web environment).

	Inner bean definitions inherit the singleton status of their containing
	bean definition, unless explicitly specified: The inner bean will be a
	singleton if the containing bean is a singleton, and a prototype if
	the containing bean has any other scope.
				]]></xsd:documentation>
    </xsd:annotation>
</xsd:attribute>