On Tue, 2002-10-01 at 17:38, Peter Donald wrote:
<snip/>

> Wait for Interceptors - they be magic.

<snip/>

> interface Releaseable
> {
>   void release();
> }
> 
> The magic thing about what I am going to propose in about amonth is that no 
> component will ever implement this interface ;)
> 
> Lets assume that every component is exposed via a proxy with an interceptor 
> chain attached to it. So when you invoke a method it will be passed through 
> each interceptor in chain. 
> 
> Just say our chain looks something like
> 
> Service Interface
>        |
>        v
> Pooling Interceptor
>        |
>        V
>  Target Method
> 
> Now lets just say that our pooling interceptor looks something like
> 
> Object invoke( Invocation i, InterceptorContext ctx )
> {
>   if( i.getMethod() == m_cachedReleaseMethod )
>   {
>     ObjectPool pool = (ObjectPool)ctx.get( ObjectPool.KEY );
>     Object object = ctx.remove( InterceptorContext.TARGET );
>     pool.release( object );
>     return null;
>   }
>   else
>   {
>     return ctx.invokeNext( i, ctx );
>   }
> }

<20 seconds of silence...>

WAAAAAAH! This is f****ing neat. It also means total re-architecture of
the container, but hey...that's all internals. IOW: I get it =)

I figured The Biggest Thing This Week would be Red Hat 8, but this is
such a big "gotcha", I think Pete's getting the honours.

We'll have to wait the rest of the month to see more? Shame....

cheers,

Leo


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

Reply via email to