cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: svn commit: r750522 -
Date Thu, 05 Mar 2009 21:38:14 GMT
On Thu March 5 2009 2:36:55 pm Sergey Beryozkin wrote:
> ok, I guess I misinterpreted the original hint. I'll get back to it
> tomorrow as I'm off now, will update the AbstractOutDatabindingInterceptor
> to check the message instead...
>
> By the way, what is the key idea behind the message contextual property as
> opposed to a plain message property (set on the inbound/outbound message).
> When such a contextual property is supposed to be set ? Is it when say
> properties on a jaxws:endpoint are configured ?

The contextual property check a hiearchy of places.   The Message is first, so 
anything set on the message overrides anything else.   I think the exchange is 
next, then the service, then the endpoint.   I plan on adding a properties 
thing to the Bus as well and making that last (to allow Bus scoped 
properties), just haven't gotten around to it.  

The main thing this allows is configuring things at various levels.  For 
example, take MTOM.    You can configure it in spring config which would put 
it at a endpoint level.   However, an interceptor could override it by setting 
it on the message.   That changes the behavior for that invokation, but not 
all invokations.  

Dan


>
>
> Cheers, Sergey
>
> ----- Original Message -----
> From: "Daniel Kulp" <dkulp@apache.org>
> To: <dev@cxf.apache.org>
> Sent: Thursday, March 05, 2009 6:39 PM
> Subject: Re: svn commit: r750522 - in /cxf/trunk:
> common/common/src/main/java/org/apache/cxf/common/util/
> rt/core/src/main/java/org/apache/cxf/bus/spring/
> rt/core/src/main/java/org/apache/cxf/interceptor/
> rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ rt...
>
> On Thu March 5 2009 12:52:21 pm sergeyb@apache.org wrote:
> > CachingXmlEventWriter cache = null;
> >
> > - if (shouldValidate(message) && !isRequestor(message)) {
> > - //need to cache the events in case validation fails
> > + // need to cache the events in case validation fails or buffering
> > is enabled + if (shouldValidate(message) && !isRequestor(message)
> > + || SystemUtils.isBufferingEnabled()) {
> > cache = new CachingXmlEventWriter();
> > try {
>
> This definitely shouldn't be based on a system property.   It should be
> something like:
>
> message.getContextualProperty("org.apache.cxf.buffer.output")
>
> or similar so it can be configured on a per-endpoint basis.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Mime
View raw message