You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by justinblandford <ju...@googlemail.com> on 2012/11/29 11:37:09 UTC

Setting default values for JVM system properties in Camel routes

Hi,

I have a question related to a Camel route that uses an injected JVM system
property:-
<to uri="mqBean:{{queueName}}" />

However if the JVM system properties do not exist, I would like to provide
defaults for this in a Spring context.  I've read several things related to
this and I'm currently using the PropertiesComponent to get the JVM system
properties (which works if they exist).  Could you confirm the best approach
to set default values for 'queueName' in this example in a Spring context?

Regards,

Justin



--
View this message in context: http://camel.465427.n5.nabble.com/Setting-default-values-for-JVM-system-properties-in-Camel-routes-tp5723382.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: Setting default values for JVM system properties in Camel routes

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

If not mistaking if you have a .properties file or the likes with the
Camel properties component.
Then you can use that as fallback. As JVM system properties take
precedence over any property keys.


On Thu, Nov 29, 2012 at 11:37 AM, justinblandford
<ju...@googlemail.com> wrote:
> Hi,
>
> I have a question related to a Camel route that uses an injected JVM system
> property:-
> <to uri="mqBean:{{queueName}}" />
>
> However if the JVM system properties do not exist, I would like to provide
> defaults for this in a Spring context.  I've read several things related to
> this and I'm currently using the PropertiesComponent to get the JVM system
> properties (which works if they exist).  Could you confirm the best approach
> to set default values for 'queueName' in this example in a Spring context?
>
> Regards,
>
> Justin
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Setting-default-values-for-JVM-system-properties-in-Camel-routes-tp5723382.html
> Sent from the Camel Development mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen