Carsten Ziegeler wrote:
> 
> Hi,
> 
> I just wanted to make a SingleThreaded component poolable. Is this
> not allowed?

They are not allowed.  Currently SingleThreaded marks interfaces that
cannot be reused, and must be used in one thread at a time.  Therefore,
they are manufactured by the Factory method.

Poolable components (inherently only run in one thread at a time) can
be reused, therefore when one thread is done with it, it is returned
to the pool.

Notice the distinction.

> I get an exception from the excalibur component manager, which does
> the following test:
> >>>
>         if (SingleThreaded.class.isAssignableFrom(componentClass))
>         {
>             numInterfaces++;
>         }
> 
>         if (ThreadSafe.class.isAssignableFrom(componentClass))
>         {
>             numInterfaces++;
>         }
> 
>         if (Poolable.class.isAssignableFrom(componentClass))
>         {
>             numInterfaces++;
>         }
> <<<
> This means these interfaces can not combined. I agree that
> SingleThreaded and ThreadSafe are not possible and
> ThreadSafe and Poolable don't make sense, but
> Poolable and SingleThreaded seems ok to me.
> Or am I wrong?
> 
> Carsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to