> From: Stephen McConnell [mailto:[EMAIL PROTECTED]]
>
> Leo Sutic :
> [snip]
>
> > If SM replaces CM in Avalon5, *all* code written for Avalon4 will
> > break. Not just in a way that can be solved with a search and
> > replace, but the code has to be re-engineered to detect poolable
> > components, or do away with those.
>
> If we take ExcaliburComponentManager as an example, we can see that
> the transitional impact of ServiceManager, ServiceSelector
> and ServicePool is minimal.  ExcaliburComponetManager is in effect
> a generalisation of the managed and pooled cases.  The only
> modification required would be the narrowing of the parent manager
> to a ServicePool before invoking release.
>
>   Current Excalibur release implementation includes:
>
>       m_parentManager.release(component);
>
>   The SOC introduced in the proposal would result in:
>
>       if( m_parentManager instanceof ServicePool )
>         ((ServicePool)m_parentManager).release(component);

So if I have this code:

     MyService service = (MyService) manager.lookup( "MY-ROLE" );

How do I go from a ThreadSafe MyService to a Pooled version without having
to
change my code to:

     ServicePool pool = (ServicePool) manager.lookup( "MY-POOL" );
     MyService service = pool.checkout( this );
     MyService service = pool.checkout( this, myCriteria ); // alternative
     pool.release( service );
     pool.releaseAll( this ); // alternative

As you are going from a one-step lookup for non-pooled components to a
two-step
lookup for pooled ones.

Also, how do I go from pooled to threadsafe implementations without having
to change back?

/LS


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

Reply via email to