Example #1
0
  public static void main(String[] args) throws Exception {

    String dsl = args.length == 1 && "spring".equals(args[0]) ? "spring" : "java";
    logger.debug("Taking " + dsl + " configuration!");

    ApplicationContext appCtx =
        new ClassPathXmlApplicationContext("multicasting/app-ctx-" + dsl + "dsl.xml");
    SpringCamelContext camelCtx = (SpringCamelContext) appCtx.getBean("camelCtx");
    camelCtx.start();
    Thread.sleep(5000);
    camelCtx.stop();
  }
Example #2
0
 @Override
 protected CamelContext createCamelContext() throws Exception {
   applicationContext =
       new ClassPathXmlApplicationContext("org/apache/camel/processor/jpa/springJpaRouteTest.xml");
   cleanupRepository();
   return SpringCamelContext.springCamelContext(applicationContext);
 }
Example #3
0
 @Override
 protected CamelContext createCamelContext() throws Exception {
   setThreadContextClassLoader();
   applicationContext =
       new OsgiBundleXmlApplicationContext(
           new String[] {"org/apache/camel/itest/osgi/jpa/springJpaRouteContext.xml"});
   if (bundleContext != null) {
     applicationContext.setBundleContext(bundleContext);
     applicationContext.refresh();
   }
   return SpringCamelContext.springCamelContext(applicationContext);
 }
  public static void main(String[] args) throws Exception {

    logger.info("start");

    CamelContext camelContext = SpringCamelContext.springCamelContext("camel-context.xml");

    for (int index = 0; index < 3; index++) {
      logger.info("get " + index);
      get(camelContext);

      logger.info("put " + index);
      put(camelContext);
    }

    camelContext.stop();

    logger.info("end");
  }
  protected CamelContext createCamelContext() throws Exception {
    setUseRouteBuilder(false);

    final AbstractXmlApplicationContext applicationContext =
        new ClassPathXmlApplicationContext(
            "org/apache/camel/dataformat/xstream/SpringMarshalOmitFieldsTest.xml");

    setCamelContextService(
        new Service() {
          public void start() throws Exception {
            applicationContext.start();
          }

          public void stop() throws Exception {
            applicationContext.stop();
          }
        });

    return SpringCamelContext.springCamelContext(applicationContext);
  }
 @Override
 protected CamelContext createCamelContext() throws Exception {
   return SpringCamelContext.springCamelContext(
       new ClassPathXmlApplicationContext("org/apache/camel/processor/groovy/groovyFilter.xml"));
 }
Example #7
0
 @Override
 protected CamelContext createCamelContext() throws Exception {
   applicationContext = createApplicationContext();
   return SpringCamelContext.springCamelContext(applicationContext);
 }
 protected CamelContext createCamelContext() throws Exception {
   return SpringCamelContext.springCamelContext(
       "/org/apache/camel/component/crypto/SpringPGPDataFormatTest.xml");
 }