On Monday 29 September 2008 12:41:57 pm Wulff, Oliver wrote:
> Hi Dan
>
> Thanks for clarification. Does that mean that you create a new interceptor
> list for each request?

Kind of yes, kind of no.    We do create a new PhaseInterceptorChain for each 
invokation as the chain can (does) change during the processing of the 
request.   Interceptors add tailing interceptors, etc....

The List<Interceptor> that the various interceptor providers have (like the 
Bus for instance) are not created new each time.   The list is iterated over 
to construct the PhaseInterceptorChain.

HOWEVER, there is an optimization that we do.   The List<Interceptor> that the 
common  interceptor providers return is a special version that records a 
update id.   There is a PhaseInterceptorChainCache that checks the update ids 
of the various lists with the last time and if nothing has changed, 
it "clones" a saved chain so constructing the chain in the normal cases is 
very fast.


> What is the benefit or flexibility compared to merge the interceptor list
> during proxy creation? Do you want to cover the case where the interceptor
> list of the bus is changed at runtime or anything else?

Its designed so you could do something like turn on management or logging or 
something dynamically and everything would pick it up immediately.   

Dan



>
> Thanks
>
> -----Ursprüngliche Nachricht-----
> Von: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Gesendet: Mo 29.09.2008 17:22
> An: [email protected]
> Cc: Wulff, Oliver
> Betreff: Re: JaxWsProxyFactoryBean.create, remove interceptor in List
>
>
> Oliver,
>
> This won't work.   In your config, you are defining the feature onto the
> Bus. Thus, the Bus has those interceptors defined on it, not the client.  
> At runtime, we collect the interceptors from the bus, client, endpoint,
> etc... into a single chain on a per-request basis.    They aren't copied
> over at proxy creation time.
>
> To accomplish this, you would need to add an interceptor onto the client
> that would run BEFORE the PMP interceptors and it would remove them from
> the chain.
>
> Dan
>
> On Monday 29 September 2008 6:54:51 am Wulff, Oliver wrote:
> > Hi there
> >
> > I've created a proxy with the following approach:
> >             JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> >             factory.setServiceClass(EncryptionInterfaceV10.class);
> >     factory.create();
> >
> > I'd like to remove an interceptor for this proxy which is configured by
> > default on the bus level (this feature registers interceptors) <cxf:bus>
> >             <cxf:features>
> >                     <ref bean="PMPFeature" />
> >             </cxf:features>
> >     </cxf:bus>
> >
> > But I always get an empty interceptor list back:
> >     Client proxy = JaxWsClientProxy.getClient(myProxy);
> >     Iterator<Interceptor> ints = proxy.getOutInterceptors().iterator();
> >
> > When I invoke a method on this proxy, the interceptor is called which I
> > want to remove.
> >
> > Are the interceptor on the bus level and on the proxy level managed
> > separately?
> >
> > Thanks
> > Oliver



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to