You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Ryan Callaghan (JIRA)" <ji...@apache.org> on 2010/07/08 21:09:51 UTC

[jira] Created: (CAMEL-2926) Injecting Properties into the PropertiesComponent with Spring

Injecting Properties into the PropertiesComponent with Spring
-------------------------------------------------------------

                 Key: CAMEL-2926
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2926
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core, camel-spring
    Affects Versions: 2.3.0
            Reporter: Ryan Callaghan
            Priority: Minor


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>

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.


[jira] Commented: (CAMEL-2926) Injecting Properties into the PropertiesComponent with Spring

Posted by "Paul Mietz Egli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60556#action_60556 ] 

Paul Mietz Egli commented on CAMEL-2926:
----------------------------------------

As a side note, this would be awesome for those of us who are using Camel inside an OSGi container and getting properties from the OSGi CM service!

> Injecting Properties into the PropertiesComponent with Spring
> -------------------------------------------------------------
>
>                 Key: CAMEL-2926
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2926
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-spring
>    Affects Versions: 2.3.0
>            Reporter: Ryan Callaghan
>            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="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>
> 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.


[jira] Assigned: (CAMEL-2926) Injecting Properties into the PropertiesComponent with Spring

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-2926:
----------------------------------

    Assignee: Claus Ibsen

> Injecting Properties into the PropertiesComponent with Spring
> -------------------------------------------------------------
>
>                 Key: CAMEL-2926
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2926
>             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="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>
> 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.


[jira] Resolved: (CAMEL-2926) Injecting Properties into the PropertiesComponent with Spring

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-2926.
--------------------------------

    Fix Version/s: 2.4.0
                       (was: 2.5.0)
       Resolution: Fixed

trunk: 962581.

> Injecting Properties into the PropertiesComponent with Spring
> -------------------------------------------------------------
>
>                 Key: CAMEL-2926
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2926
>             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.4.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:
> {code}
> <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
>     <property name="location" value="classpath:com/mycompany/myprop.properties"/>
> </bean>
> {code}
> This would be improved if we could simply say:
> {code}
> <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
>     <property name="location" ref="myPropertiesBean"/>
> </bean>
> {code}
> 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:
> {code}
> <camelContext ...>
>    <propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
> </camelContext>
> {code}
> Similarly it would be nice to say:
> {code}
> <camelContext ...>
>    <propertyPlaceholder id="properties" ref="myPropertiesBean" />
> </camelContext>
> {code}
> 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.


[jira] Updated: (CAMEL-2926) Injecting Properties into the PropertiesComponent with Spring

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-2926:
-------------------------------

    Fix Version/s: 2.5.0

> Injecting Properties into the PropertiesComponent with Spring
> -------------------------------------------------------------
>
>                 Key: CAMEL-2926
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2926
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-spring
>    Affects Versions: 2.3.0
>            Reporter: Ryan Callaghan
>            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="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>
> 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.


[jira] Updated: (CAMEL-2926) Injecting Properties into the PropertiesComponent with Spring

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-2926:
-------------------------------

    Description: 
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:
{code}
<bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
    <property name="location" value="classpath:com/mycompany/myprop.properties"/>
</bean>
{code}

This would be improved if we could simply say:
{code}
<bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
    <property name="location" ref="myPropertiesBean"/>
</bean>
{code}

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:
{code}
<camelContext ...>
   <propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
</camelContext>
{code}

Similarly it would be nice to say:
{code}
<camelContext ...>
   <propertyPlaceholder id="properties" ref="myPropertiesBean" />
</camelContext>
{code}

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. 

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

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. 


> Injecting Properties into the PropertiesComponent with Spring
> -------------------------------------------------------------
>
>                 Key: CAMEL-2926
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2926
>             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:
> {code}
> <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
>     <property name="location" value="classpath:com/mycompany/myprop.properties"/>
> </bean>
> {code}
> This would be improved if we could simply say:
> {code}
> <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
>     <property name="location" ref="myPropertiesBean"/>
> </bean>
> {code}
> 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:
> {code}
> <camelContext ...>
>    <propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
> </camelContext>
> {code}
> Similarly it would be nice to say:
> {code}
> <camelContext ...>
>    <propertyPlaceholder id="properties" ref="myPropertiesBean" />
> </camelContext>
> {code}
> 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.


[jira] Commented: (CAMEL-2926) Injecting Properties into the PropertiesComponent with Spring

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60558#action_60558 ] 

Claus Ibsen commented on CAMEL-2926:
------------------------------------

Okay anything for OSGi.

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

{code:xml}
<camelContext ...>
   <propertyPlaceholder id="properties" location="ref:someId"/>
</camelContext>
{code}

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: https://issues.apache.org/activemq/browse/CAMEL-2926
>             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="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>
> 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.