> From: Michael McKibben [mailto:[EMAIL PROTECTED]]
>
> What if the marking of single-theaded, poolable was all done in the
> configuration? For example
>
> <component-instance class="ThreadSafeClass" role="role1"
> thread-safe="true"/>
> <component-instance class="PoolableClass" role="role2"
> thread-safe="false" poolable="true"/>
>
> Then we don't have to worry about the ThreadSafe/Poolable marker
> interfaces.
Bad. This means that the person configuring the system must be aware of
implementation-specific details. Consider the following:
<component class="ThreadSafeClass" role="role1"
thread-safe="true" initializable="true" composable="false"
etc.../>
The thing is that the values of the thread-safe etc. attributes
*aren't* configurable, and should therefore not be part of the component's
configuration. The thread-safe attribute for example, can only have one
valid value - set it wrong and the system doesn't work at all. Thus it makes
perfect sense to make that attribute accessible via the component class
and not via a configuration.
I would propose something like this instead. Since Berin is factoring out
the container part of the ECM (the component handlers, if I understand it
correctly), make the component handler configurable:
<component class="ThreadSafeClass" role="role1"
container="MyContainerClass"/>
If no container attribute is specified, the default handler is used.
This would enable the factory pattern sought by some. Granted, the container
would still have to produce a Component and not an Object, but this is
trivial
given a coarse interface.
/LS
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>