Examples of createExecutionContext()


Examples of org.apache.hive.ptest.execution.context.ExecutionContextProvider.createExecutionContext()

    ExecutionContext executionContext = null;
    int exitCode = 0;
    try {
      executionContextProvider = executionContextConfiguration
          .getExecutionContextProvider();
      executionContext = executionContextProvider.createExecutionContext();
      LocalCommandFactory localCommandFactory = new LocalCommandFactory(LOG);
      PTest ptest = new PTest(conf, executionContext, buildTag, logDir,
          localCommandFactory, new SSHCommandExecutor(LOG, localCommandFactory, conf.getSshOpts()),
          new RSyncCommandExecutor(LOG, 10, localCommandFactory), LOG);
      exitCode = ptest.run();
View Full Code Here

Examples of org.apache.hive.ptest.execution.context.ExecutionContextProvider.createExecutionContext()

        ExecutionContext executionContext = null;
        int exitCode = 0;
        try {
          executionContextProvider = executionContextConfiguration
              .getExecutionContextProvider();
          executionContext = executionContextProvider.createExecutionContext();
          PTest ptest = new PTest(conf, executionContext, buildTag, logDir,
              new LocalCommandFactory(LOG), new SSHCommandExecutor(LOG),
              new RSyncCommandExecutor(LOG), LOG);
          exitCode = ptest.run();
        } finally {
View Full Code Here

Examples of org.eclipse.m2e.core.embedder.IMaven.createExecutionContext()

   * @return
   * @throws CoreException
   */
  public static boolean runBuild(List<String> goals, Properties serverProperties, IModule module, IProgressMonitor monitorthrows CoreException {
    IMaven maven = MavenPlugin.getMaven();
    IMavenExecutionContext executionContext = maven.createExecutionContext();
    MavenExecutionRequest executionRequest = executionContext.getExecutionRequest();
    executionRequest.setPom(getModelFile(module));
    if (serverProperties != null && serverProperties.isEmpty() == false) {
      Server fabric8Server = new Server();
      fabric8Server.setId(serverProperties.getProperty(SERVER_ID));
View Full Code Here

Examples of org.milyn.Smooks.createExecutionContext()

      String configFileName = dataLoader.config();

      log.fine("Loading smooks configuration file " + configFileName);
      Smooks smooks = new Smooks(getClass().getResourceAsStream(
          configFileName));
      ExecutionContext executionContext = smooks.createExecutionContext();
      executionContext.getBeanContext().addBean(OFY_HELPER,
          getOfyHelperBean());
      MapDaoRegister<Object> register = MapDaoRegister
          .newInstance(getDAOMap());
View Full Code Here

Examples of org.milyn.Smooks.createExecutionContext()

      String configFileName = dataLoader.config();

      LOGGER.fine("Loading smooks configuration file " + configFileName);
      Smooks smooks = new Smooks(getClass().getResourceAsStream(
        configFileName));
      ExecutionContext executionContext = smooks.createExecutionContext();
      executionContext.getBeanContext().addBean(OFY_HELPER,
        getOfyHelperBean());
      MapDaoRegister<Object> register = MapDaoRegister
        .newInstance(getDAOMap());
View Full Code Here

Examples of org.milyn.Smooks.createExecutionContext()

                smooks = producer.createSmooks(domain, config);
            }
            if (smooks == null) {
                smooks = new Smooks(config);
            }
            smooks.createExecutionContext();
        } catch (Exception e) {
            throw TransformMessages.MESSAGES.failedToCreateSmooksInstance(config, e);
        }

        Transformer transformer;
View Full Code Here

Examples of org.milyn.Smooks.createExecutionContext()

    private void test_exception(String config, boolean expectException) throws IOException, SAXException {
        Smooks smooks = new Smooks("/org/milyn/delivery/" + config);

        if(expectException) {
            try {
                smooks.filterSource(smooks.createExecutionContext(), new StreamSource(new StringReader("<doc/>")), null);
                fail("Expected SmooksException");
            } catch(SmooksException e) {
                assertEquals("Terminate Exception", e.getCause().getMessage());
            }
        } else {
View Full Code Here

Examples of org.milyn.Smooks.createExecutionContext()

                fail("Expected SmooksException");
            } catch(SmooksException e) {
                assertEquals("Terminate Exception", e.getCause().getMessage());
            }
        } else {
            smooks.filterSource(smooks.createExecutionContext(), new StreamSource(new StringReader("<doc/>")), null);
        }
    }
}
View Full Code Here

Examples of org.milyn.Smooks.createExecutionContext()

        }
    }

    private void test(String config, List<Object> sourceObjects, String expected) throws IOException, SAXException {
        Smooks smooks = new Smooks(getClass().getResourceAsStream(config));
        ExecutionContext execContext = smooks.createExecutionContext();
        JavaSource source = new JavaSource(sourceObjects);
        StringWriter result = new StringWriter();

        smooks.filterSource(execContext, source, new StreamResult(result));
        assertEquals(expected, result.toString());
View Full Code Here

Examples of org.milyn.Smooks.createExecutionContext()

    public void test() throws IOException, SAXException {
        Smooks smooks = new Smooks();

        smooks.addConfigurations("expansion-config.xml", getClass().getResourceAsStream("expansion-config.xml"));
        ExecutionContext context = smooks.createExecutionContext();

        DOMContentDeliveryConfig config = (DOMContentDeliveryConfig) context.getDeliveryConfig();
        ContentHandlerConfigMapTable<DOMVisitBefore> assemblyVisitBefores = config.getAssemblyVisitBefores();
        ContentHandlerConfigMapTable<DOMVisitAfter> assemblyVisitAfters = config.getAssemblyVisitAfters();
        ContentHandlerConfigMapTable<DOMVisitBefore> processingVisitBefores = config.getProcessingVisitBefores();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.