Hi Willem Spot on. Thanks for the great review.
/Claus Ibsen Apache Camel Committer Blog: http://davsclaus.blogspot.com/ On Tue, Dec 9, 2008 at 6:44 AM, Willem Jiang <[EMAIL PROTECTED]> wrote: > Hi Claus, > > No, if you take a look at HttpComponent and CxfSoapComponent, you will > find these component still call the setProperties method, even the > useIntrospectionOnEndpoint = false. > > They have their own parameter interceptions when they create the > endpoint, such as > > Map soapProps = IntrospectionSupport.extractProperties(parameters, "soap."); > > HttpClientParams params = new HttpClientParams(); > IntrospectionSupport.setProperties(params, parameters, "httpClient."); > > I think they just don't want the URI parameters has the side effect on > the endpoint. > > > Willem > > Claus Ibsen wrote: >> Hi William >> >> Isn't it the idea of the useIntrospectionOnEndpoint=false to not allow >> Camel to do this auto discovery of setters? >> So to be safe I added this check as well. >> >> BTW: Which components set this to false? >> >> /Claus Ibsen >> Apache Camel Committer >> Blog: http://davsclaus.blogspot.com/ >> >> >> >> On Tue, Dec 9, 2008 at 3:53 AM, Willem Jiang <[EMAIL PROTECTED]> wrote: >>> Hi Claus, >>> >>> The change of the DefaultComponent setProperties() will be blocked to >>> the components which extend the DefaultComponent and set the >>> useIntrospectionOnEndpoint to be false. >>> >>> So I will remove the check of useIntrospectionOnEndpoint() in the >>> setProperties in my next commit to fixed the unit test error. >>> >>> Willem >>> >>> >>> [EMAIL PROTECTED] wrote: >>>> Author: davsclaus >>>> Date: Mon Dec 8 03:55:04 2008 >>>> New Revision: 724319 >>>> >>>> URL: http://svn.apache.org/viewvc?rev=724319&view=rev >>>> Log: >>>> CAMEL-895: Added support for # notation in endpoint URIs to lookup a bean >>>> in the registry >>>> >>> ...... >>>> Modified: >>>> activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java >>>> URL: >>>> http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java?rev=724319&r1=724318&r2=724319&view=diff >>>> ============================================================================== >>>> --- >>>> activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java >>>> (original) >>>> +++ >>>> activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java >>>> Mon Dec 8 03:55:04 2008 >>>> @@ -17,6 +17,7 @@ >>>> package org.apache.camel.impl; >>>> @@ -185,7 +186,48 @@ >>>> * Sets the bean properties on the given bean >>>> */ >>>> protected void setProperties(Object bean, Map parameters) throws >>>> Exception { >>>> - >>>> IntrospectionSupport.setProperties(getCamelContext().getTypeConverter(), >>>> bean, parameters); >>>> + if (useIntrospectionOnEndpoint()) { >>>> + // set reference properties first as they use # syntax that >>>> fools the regular properties setter >>>> + setReferenceProperties(bean, parameters); >>>> + >>>> IntrospectionSupport.setProperties(getCamelContext().getTypeConverter(), >>>> bean, parameters); >>>> + } >>>> + } >> > >
