Leo Sutic wrote:
From: Stephen McConnell [mailto:[EMAIL PROTECTED]
a solid defition of the four "standard" lifestyles.
I think we already have that. Pooled means one-per-lookup,
from a common pool, singleton means singleton per container, transient means one new instance per lookup.
Why not just let the definitions stand as they are? I think they are clear enough. The words "pooled" and "singleton" are well defined. "Transient" is made up here, but if we say "one new instance for each lookup()" then I think most people will understand.
Some questions for you - here is a defintion of a container with two components. Lets assume that the component lifestyle is singleton.
<container name="demo">
<component type="PersonProvider" name="accounts">
<configuration>
<name>Sally</name>
</configuration>
</component>
<component type="PersonProvider" name="logistics">
<configuration>
<name>Carol</name>
</configuration>
</component>
</container>I've just broken you defintion of a singeton. My notion of a "singleton" lifestyle is that an instance of an identifiable component deployment scenario may be shared across all requests - and that multiple deployment scenarios may coexist for that type. In the above example - we would see two component managers each differentiated in terms of the deployment scenario (different confuration or parameters, etc.).
Transient - a new instance per lookup - fine with that.
Pooled - nothing more than a managed transient.
Thread - same as singleton except that is scope with respect to sharing is a new instance per thread.
Stephen.
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
