Hi

Yeah good idea feel free to create a JIRA ticket


On Thu, Jul 8, 2010 at 8:33 AM, Ryan Callaghan <[email protected]> wrote:
>
> The component is quite nice - however a good improvement would be allowing
> properties to be injected through Spring.
>
> Currently there are two ways to do this using Spring.
>
> 1) Declare a bean with an id of properties:
> <bean id="properties"
> class="org.apache.camel.component.properties.PropertiesComponent">
>    <property name="location"
> value="classpath:com/mycompany/myprop.properties"/>
> </bean>
>
> This would be improved if we could simply say:
> <bean id="properties"
> class="org.apache.camel.component.properties.PropertiesComponent">
>    <property name="location" ref="myPropertiesBean"/>
> </bean>
>
> This would allow properties to be declared in Spring using
> <util:properties/>.  The same properties grouping could be injected into
> Camel as is injected into other beans.
>
> 2) Inline within the camelContext defined in Spring:
> <camelContext ...>
>   <propertyPlaceholder id="properties"
> location="com/mycompany/myprop.properties"/>
> </camelContext>
>
> Similarly it would be nice to say:
> <camelContext ...>
>   <propertyPlaceholder id="properties" ref="myPropertiesBean" />
> </camelContext>
>
> Do others think this is worthwhile and needing a JIRA ticket?  I noticed
> CAMEL-2791 is out there to access JVM system properties - it would be good
> to not have to load as a system property to access them in Camel.
>
> Ryan
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Injecting-Properties-into-the-PropertiesComponent-with-Spring-tp1044929p1044929.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Reply via email to