Some other hints to improve Velocity performance:
Velocity.setProperty("resource.loader", "file");
Velocity.setProperty("file.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.FileResourceLoader");
Velocity.setProperty(Velocity.FILE_RESOURCE_LOADER_CACHE,
Boolean.TRUE);
Velocity.setProperty(Velocity.VM_LIBRARY_AUTORELOAD, Boolean.TRUE);
Velocity.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, VM_PATH);
Velocity.setProperty("file.resource.loader.modificationCheckInterval", "5");
the last is the most important if the VLT's are in the file system instead
of inside the jar file
misge wrote:
>
> In order to impove performance you can set this in the velocity source
> component:
> and instead of this:
> public VelocityEngine getVelocityEngine() throws Exception {
> if (velocityEngine == null) {
> velocityEngine = component.getVelocityEngine();
> velocityEngine.init();
> }
> return velocityEngine;
> }
>
> to this:
> public VelocityEngine getVelocityEngine() throws Exception {
> if (velocityEngine == null) {
> velocityEngine = component.getVelocityEngine();
> velocityEngine.init();
> Velocity.setProperty(Velocity.FILE_RESOURCE_LOADER_CACHE,
> Boolean.TRUE);
> }
> return velocityEngine;
> }
>
>
>
--
View this message in context:
http://www.nabble.com/Velocity-templating-tp17079359s22882p17082103.html
Sent from the Camel - Users mailing list archive at Nabble.com.