On Tue, Apr 12, 2011 at 11:38 PM, jpalmer1026 <palmer1...@gmail.com> wrote:
> Hi,
>
> I have a properties bean defined in my Spring application context file that
> I use to specify the location of an externalized property file. The problem
> I'm having is that I need to reference properties contained in the
> externalized property file from a bean defined in the Spring application
> file. So far the only way I'm been able to do this is to use a
> context:property-placeholder tag as well as a Camel PropertiesComponent
> bean.
>
> Is there a way to use just the Camel PropertiesComponent bean without
> requiring the context:property-placeholder tag?
>

If you use any of the Spring properties support then you need
context:property-placeholder. SpringSource guys are not very friendly
to make it easy for 3rd party to influence the placeholder code. There
has been a JIRA for more then 3+ years about that. See the Camel FAQ.

However there was a person in this forum which posted a way of doing a
"delegate" using a bit more ugly <bean> style. Where you define a
custom <bean> that wraps the spring property placeholder and bridge
that with Camel.

We could reconsider that and maybe try to add some nicer way if that
would be possible.


BTW how do you reference that property from your bean?
We have considered adding a Camel annotation to reference a Camel
property. But I assume ppl would rather use a Spring annotation or
something from the JDK if possible. It would be neat if there was a
standard annotation 3rd party frameworks could rely on.



> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Using-PropertiesComponent-tp4299191p4299191.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to