On Wed, Mar 10, 2010 at 3:53 AM, Willem Jiang <willem.ji...@gmail.com> wrote: > Hi Claus, > > This change introduced other issue that the properties component may not > know the properties file to load. > And current camel-core build is failed with this change. > Can you take a look at it? >
Yeah I will take a look. > Willem > > davscl...@apache.org wrote: >> >> Author: davsclaus >> Date: Tue Mar 9 12:02:58 2010 >> New Revision: 920819 >> >> URL: http://svn.apache.org/viewvc?rev=920819&view=rev >> Log: >> Properties component should be auto loaded if in need >> >> Modified: >> >> camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java >> >> Modified: >> camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java >> URL: >> http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=920819&r1=920818&r2=920819&view=diff >> >> ============================================================================== >> --- >> camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java >> (original) >> +++ >> camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java >> Tue Mar 9 12:02:58 2010 >> @@ -174,8 +174,9 @@ public class DefaultCamelContext extends >> } >> /** >> - * Creates the {...@link CamelContext} using the given JNDI context as >> the >> - * registry >> + * Creates the {...@link CamelContext} using the given JNDI context as >> the registry >> + * >> + * @param jndiContext the JNDI context >> */ >> public DefaultCamelContext(Context jndiContext) { >> this(); >> @@ -184,6 +185,8 @@ public class DefaultCamelContext extends >> /** >> * Creates the {...@link CamelContext} using the given registry >> + * >> + * @param registry the registry >> */ >> public DefaultCamelContext(Registry registry) { >> this(); >> @@ -196,6 +199,8 @@ public class DefaultCamelContext extends >> /** >> * Sets the name of the this context. >> + * >> + * @param name the name >> */ >> public void setName(String name) { >> this.name = name; >> @@ -724,7 +729,7 @@ public class DefaultCamelContext extends >> // do not parse uris that are designated for the properties >> component as it will handle that itself >> if (uri != null && !uri.startsWith("properties:") && >> uri.contains("#{")) { >> // the uri contains property placeholders so lookup mandatory >> properties component and let it parse it >> - Component component = hasComponent("properties"); >> + Component component = getComponent("properties"); >> if (component == null) { >> throw new IllegalArgumentException("PropertiesComponent >> with name properties must be defined" >> + " in CamelContext to support property >> placeholders in endpoint URIs"); >> >> >> > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus