// use a spring 2.x task executor
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(4);
executor.setMaxPoolSize(16);
executor.setThreadNamePrefix("foo");
executor.afterPropertiesSet();
jms.setTaskExecutorSpring2(executor);
camelContext.addComponent("activemq", jms);
return camelContext;