Repository: camel
Updated Branches:
  refs/heads/master 18d5c3c61 -> cccfe7528


Allow the box.com account settings used in the box example come from the karaf 
env.

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cccfe752
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cccfe752
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cccfe752

Branch: refs/heads/master
Commit: cccfe7528316f0fee52ece434a30af65a3c199a8
Parents: 18d5c3c
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Thu Jul 3 14:09:50 2014 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Thu Jul 3 14:09:50 2014 -0400

----------------------------------------------------------------------
 examples/camel-example-box-osgi/README.txt       |  6 +++---
 .../resources/META-INF/spring/camel-context.xml  | 19 +++++++++++++++----
 2 files changed, 18 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cccfe752/examples/camel-example-box-osgi/README.txt
----------------------------------------------------------------------
diff --git a/examples/camel-example-box-osgi/README.txt 
b/examples/camel-example-box-osgi/README.txt
index a1f99eb..82a5dd6 100644
--- a/examples/camel-example-box-osgi/README.txt
+++ b/examples/camel-example-box-osgi/README.txt
@@ -13,14 +13,14 @@ Then you will need to compile the example:
 To run the example on Apache ServiceMix 4.x or Apache Karaf 2.2.x
 
 1) launch karaf
-  
+
 2) Add features required
 features:addUrl mvn:org.apache.camel.karaf/apache-camel/${version}/xml/features
 features:install camel-spring
 features:install camel-box
-  
+
 3) Deploy the example
-osgi:install -s mvn:org.apache.camel/camel-example-cxf-osgi/${version}
+osgi:install -s mvn:org.apache.camel/camel-example-box-osgi/${version}
 
 4) Copy files to the inbox directory.
 

http://git-wip-us.apache.org/repos/asf/camel/blob/cccfe752/examples/camel-example-box-osgi/src/main/resources/META-INF/spring/camel-context.xml
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-box-osgi/src/main/resources/META-INF/spring/camel-context.xml
 
b/examples/camel-example-box-osgi/src/main/resources/META-INF/spring/camel-context.xml
index 14b056d..6273825 100644
--- 
a/examples/camel-example-box-osgi/src/main/resources/META-INF/spring/camel-context.xml
+++ 
b/examples/camel-example-box-osgi/src/main/resources/META-INF/spring/camel-context.xml
@@ -23,13 +23,24 @@
            http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
            ">
 
+  <bean id="placeholder" 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+    <property name="locations">
+      <list>
+        <value>file:box.com.properties</value>
+      </list>
+    </property>
+    <property name="ignoreResourceNotFound" value="true" />
+    <property name="searchSystemEnvironment" value="true" />
+    <property name="systemPropertiesModeName" 
value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
+  </bean>
+
   <bean id="box" class="org.apache.camel.component.box.BoxComponent">
     <property name="configuration">
       <bean class="org.apache.camel.component.box.BoxConfiguration">
-        <property name="userName" value=""/>
-        <property name="userPassword" value=""/>
-        <property name="clientId" value=""/>
-        <property name="clientSecret" value=""/>
+        <property name="userName" value="${box.userName}"/>
+        <property name="userPassword" value="${box.userPassword}"/>
+        <property name="clientId" value="${box.clientId}"/>
+        <property name="clientSecret" value="${box.clientSecret}"/>
       </bean>
     </property>
   </bean>

Reply via email to