camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Commented: (CAMEL-2926) Injecting Properties into the PropertiesComponent with Spring
Date Fri, 09 Jul 2010 15:34:52 GMT


Claus Ibsen commented on CAMEL-2926:

Okay anything for OSGi.

I am adding a {{ref}} scheme so you can do

<camelContext ...>
   <propertyPlaceholder id="properties" location="ref:someId"/>

Where {{someId}} is a id of a {{java.util.Properties}} to lookup in the {{Registry}}. Which
in OSGi will check the OSGi service registry.

> Injecting Properties into the PropertiesComponent with Spring
> -------------------------------------------------------------
>                 Key: CAMEL-2926
>                 URL:
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-spring
>    Affects Versions: 2.3.0
>            Reporter: Ryan Callaghan
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.5.0
> 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="">
>     <property name="location" value="classpath:com/mycompany/"/>
> </bean>
> This would be improved if we could simply say:
> <bean id="properties" class="">
>     <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/"/>
> </camelContext>
> Similarly it would be nice to say:
> <camelContext ...>
>    <propertyPlaceholder id="properties" ref="myPropertiesBean" />
> </camelContext>
> 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. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message