ATG implements the single ton design pattern in components.
All global scope components are singleton components.
In component model there is no scope for singleton class.
Two components can use the same class and each component has its own object of the class.
For example:
Component1.properties
$class=com.MyClass
Component2.properties
$class=com.MyClass
In above example, MyClass will have two object created for each component.
Hence ATG has singleton component model but not singleton class.
All global scope components are singleton components.
In component model there is no scope for singleton class.
Two components can use the same class and each component has its own object of the class.
For example:
Component1.properties
$class=com.MyClass
Component2.properties
$class=com.MyClass
Hence ATG has singleton component model but not singleton class.
No comments:
Post a Comment