You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Raymond Feng <en...@gmail.com> on 2006/08/14 20:49:39 UTC

Adding an interceptor before InvokerInterceptor

Hi,

I ran into an issue adding an interceptor to the inbound invocation chain.

The "JDKWireService" automatically adds an "InvokerInterceptor" to the inbound invocation chain when it creates wires. InvocationChain SPI only provides a method addInterceptor() which always try to append the interceptor. But "InvokerInterceptor" has to be the last interceptor in the chain and I'm getting IllegalStateException as it's coded in InvokerInterceptor.

I can hack the JDKWireService to add my interceptor but it seems to be not ideal. Any other options? 

Thanks,
Raymond

Re: Adding an interceptor before InvokerInterceptor

Posted by Jim Marino <jm...@myromatours.com>.
On Aug 14, 2006, at 11:49 AM, Raymond Feng wrote:

> Hi,
>
> I ran into an issue adding an interceptor to the inbound invocation  
> chain.
>
> The "JDKWireService" automatically adds an "InvokerInterceptor" to  
> the inbound invocation chain when it creates wires. InvocationChain  
> SPI only provides a method addInterceptor() which always try to  
> append the interceptor. But "InvokerInterceptor" has to be the last  
> interceptor in the chain and I'm getting IllegalStateException as  
> it's coded in InvokerInterceptor.
>
> I can hack the JDKWireService to add my interceptor but it seems to  
> be not ideal. Any other options?
>
We need to get the policy registry hooked in to handle this. An  
policy builder would add the interceptor before the  
InvokerInterceptor is added. I posted on how this would be done last  
week if you want to take a shot at it.

Jim


> Thanks,
> Raymond


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org