title: Running Camel Route on Google App Engine
body: <p>I'm trying to start a Camel route on GAE and am running into one brick wall after the next. First I tried a route that looked like this:</p>
  
  <pre><code>from("direct:start")
      .process(new Processor() {
          @Override
          public void process(Exchange exchange) {
              logger.info("I made it!");
          }
      })
      .to("direct:end");
  </code></pre>
  
  <p>But that doesn't do anything. Being new to <em>both</em> Camel and GAE, I suspect that's because the <code>direct</code> component doesn't act as a consumer for the beginning of a route. So then I tried kicking off a timer:</p>
  
  <pre><code>from("timer://runOnce?repeatCount=1")
      .process(new Processor() {
          @Override
          public void process(Exchange exchange) {
              logger.info("I made it!");
          }
      })
      .to("direct:end");
  </code></pre>
  
  <p>Only to get a nasty error from GAE:</p>
  
  <blockquote>
    <p>Error: access denied (java.lang.RuntimePermission modifyThreadGroup)</p>
  </blockquote>
  
  <p>And it turns out you can't create new <code>Thread</code> instances on GAE, and that's exactly what the <code>Timer</code> component does.</p>
  
  <p>So then I tried kicking the route off with a bean:</p>
  
  <pre><code>public class DummyBean {
      public void kickoffRoute() { return; }
  }
  
  // Inside the method that creates and starts the Camel route
  SimpleRegistry reg = new SimpleRegistry();
  DummyBean bean = new DummyBean();
  reg.put("dummy", bean);
  
  CamelContext camel = new DefaultCamelContext(reg);
  camel.disableJMX();
  
  // Inside my RouteBuilder
  from("bean:dummy")
      .process(new Processor() {
          @Override
          public void process(Exchange exchange) {
              logger.info("I made it!");
          }
      })
      .to("direct:end");
  </code></pre>
  
  <p>I ran this, only to get the same "access denied" error as from before with the <code>Timer</code>.</p>
  
  <p><strong>All I'm trying to do is kick off a route from inside GAE</strong> so I can start getting familiar with both technologies (Camel &amp; GAE). But for the life of me, I can't figure out how to do this - every Camel component seems to create threads, which are illegal on GAE! So I ask:</p>
  
  <ol>
  <li>How do you even kickoff a route (an initial producer - <code>Timer</code>, or otherwise) on GAE? I see there is a <code>Camel-GAE</code> component, and I'm certainly willing to read up on it and learn how to use it, so that I could have routes starting with, say, a <code>ghttp:///startRoute</code> endpoint, but I'm really just starting out here and am hoping for an easier component/endpoint to work with.</li>
  <li>If both <code>Timer</code> and <code>Bean</code> components create threads, and this is disallowed on GAE, I have a sick feeling in my stomach that most/all Camel components are disallowed on GAE. <strong>Is this the case?!?!</strong> If so, how do you build <strong>useful/meaningful</strong> routes on GAE? Or is there some GAE "trick" to getting Camel to run and create threads? For instance, I know GAE backends do not suffer the same threading restrictions as frontend instances, etc.</li>
  </ol>
  
  <p>Thanks in advance!</p>