camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Colwell <ryangcolw...@gmail.com>
Subject Camel-Maven-Plugin, Felix.Connect, and configAdminFileName
Date Mon, 07 Nov 2016 21:55:52 GMT
I've written a few Camel routes in 2.15.2 using blueprint and property
placeholders for configuration values. I'm targeting Karaf as my production
environment and using the Camel-Maven-Plugin for running locally. For my
example I'm using the route generated by (camel-archetype-blueprint) that
logs "The messages contains ${body}" every 5 seconds but I removed the
default value from the property-placeholder.

Blueprint File Snippet(based on camel-archetype-blueprint):
  <cm:property-placeholder id="configstest.placeholder"
persistent-id="com.ds.configstest" />
  <bean id="helloBean" class="com.ds.configstest.HelloBean">
      <property name="say" value="${greeting}"/>
  </bean>

Pom:
 <plugin>
       <groupId>org.apache.camel</groupId>
        <artifactId>camel-maven-plugin</artifactId>
        <version>2.15.2</version>
        <configuration>
	     <configAdminPid>com.ds.configstest</configAdminPid>
	    
<configAdminFileName>config/com.ds.configstest.cfg</configAdminFileName>
	</configuration>
</plugin>

config/com.ds.configstest.cfg properties file:
greeting=Hello from config file

The above works great in Camel 2.15.2. When it ran locally or in Karaf(4) it
printed "The message contains Hello from config file." It allowed me to do
local testing with a config file for and then my deployments dropped QA/PROD
specific configs in $KARAF_HOME/etc/com.ds.configstest.cfg.

When I tried with today with a new project from camel-archetype-blueprint
using version 2.18.0 of Camel and I run locally with camel-maven-plugin the
log statement just prints the literal "The message contains ${greeting}" as
if the com.ds.configstest is not being picked up and applied. When I run it
in Karaf(4) it picks up the com.ds.configstest and correctly prints "The
message contains Hello from config file" in the log statement.

Does configAdminFileName work differently with the change from PojoSR to
Felix Connect as discussed in the Running OSGI Blueprint section of this
page? Can you no longer load configs to the registry this way for local
testing? https://camel.apache.org/camel-run-maven-goal.html. 

Thanks,

Ryan




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Maven-Plugin-Felix-Connect-and-configAdminFileName-tp5789878.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message