Himanshu Yadav
Himanshu Yadav

Reputation: 13585

Access JVM options in Camel Context

I have JVM option to define each envrionment. It is something like -Denv="development". How can I access this JVM option in camel context and decide my route based on the env value?

Upvotes: 0

Views: 924

Answers (1)

Ben ODay
Ben ODay

Reputation: 21015

use the camel-properties component...

PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class);

from("direct:start").to("properties:{{cool.end}}");

Upvotes: 2

Related Questions