You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2011/10/27 10:34:29 UTC
svn commit: r1189674 - in /camel/branches/camel-2.8.x: ./
components/camel-velocity/src/main/java/org/apache/camel/component/velocity/
tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/
tests/camel-itest-osgi/src/test/resources/...
Author: ningjiang
Date: Thu Oct 27 08:34:28 2011
New Revision: 1189674
URL: http://svn.apache.org/viewvc?rev=1189674&view=rev
Log:
Merged revisions 1189600 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r1189600 | ningjiang | 2011-10-27 12:01:23 +0800 (Thu, 27 Oct 2011) | 1 line
CAMEL-4587 Camel Velocity component should not require you to import CamelVelocityClasspathResourceLoader
........
Added:
camel/branches/camel-2.8.x/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/CamelVelocityDelegateClassLoader.java
- copied unchanged from r1189600, camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/CamelVelocityDelegateClassLoader.java
camel/branches/camel-2.8.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/VelocityBlueprintTest.java
- copied unchanged from r1189600, camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/velocity/VelocityBlueprintTest.java
camel/branches/camel-2.8.x/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/velocity/VelocityBlueprintRouter.xml
- copied unchanged from r1189600, camel/trunk/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/velocity/VelocityBlueprintRouter.xml
Modified:
camel/branches/camel-2.8.x/ (props changed)
camel/branches/camel-2.8.x/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 27 08:34:28 2011
@@ -1 +1 @@
-/camel/trunk:1186106,1186625,1186772,1187221,1187485,1187882,1187893,1188070-1188085,1188642,1188674,1188879,1188881
+/camel/trunk:1186106,1186625,1186772,1187221,1187485,1187882,1187893,1188070-1188085,1188642,1188674,1188879,1188881,1189600
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.8.x/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java?rev=1189674&r1=1189673&r2=1189674&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java (original)
+++ camel/branches/camel-2.8.x/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java Thu Oct 27 08:34:28 2011
@@ -93,7 +93,15 @@ public class VelocityEndpoint extends Re
properties.setProperty(CommonsLogLogChute.LOGCHUTE_COMMONS_LOG_NAME, VelocityEndpoint.class.getName());
log.debug("Initializing VelocityEngine with properties {}", properties);
- velocityEngine.init(properties);
+ // help the velocityEngine to load the CamelVelocityClasspathResourceLoader
+ ClassLoader old = Thread.currentThread().getContextClassLoader();
+ try {
+ ClassLoader delegate = new CamelVelocityDelegateClassLoader(old);
+ Thread.currentThread().setContextClassLoader(delegate);
+ velocityEngine.init(properties);
+ } finally {
+ Thread.currentThread().setContextClassLoader(old);
+ }
}
return velocityEngine;
}