When you define a definition for an element, you specify how to create
the element and define the dependency to other elements. In fact, the definition
is a template from which to create an element, you can create multiple instances
of element from the definition.
The attribute
Scope specifies
how many instances of element you can create from the definition. The ElementFactory
supports two scopes:
Table 1. Supported scopesScope |
Description |
singleton |
There is only one instance for the element definition
in one ElementFactory. |
prototype |
The element instance is created every time on the invocation
of getelement(String id). |