Examples of ConfigTree


Examples of org.jboss.soa.esb.helpers.ConfigTree

  @Test
  public void test_maxThreadsFileOverrides() throws Exception
  {
    final String expected_mtc = "100";
    final String expected_mcph = "50";
    ConfigTree parent_config = new ConfigTree("parent");
    parent_config.setAttribute(ListenerTagNames.MAX_THREADS_TAG, "1");
    ConfigTree child_config = new ConfigTree("child", parent_config);
    child_config.setAttribute("endpointUrl", "http://localhost"); // required attribute
    File file = null;
    OutputStream os = null;
    try
    {
      file = File.createTempFile(HttpClientFactory.HTTP_CLIENT_PROPERTY, ".properties");
      os = new BufferedOutputStream(new FileOutputStream(file));
      Properties fileProperties = new Properties();
      fileProperties.setProperty(Connection.MAX_TOTAL_CONNECTIONS, expected_mtc);
      fileProperties.setProperty(Connection.MAX_CONNECTIONS_PER_HOST, expected_mcph);
      fileProperties.store(os, getClass().getName());
      os.flush(); os.close(); os = null;
      child_config.setAttribute("file", file.getAbsolutePath())
      HttpSOAPProxyTransport transport = new HttpSOAPProxyTransport(child_config, null, null);
      Properties httpClientProps = transport.getHttpRouter().getHttpClientProps();
      final String actual_mtc = httpClientProps.getProperty(Connection.MAX_TOTAL_CONNECTIONS);
      assertEquals(expected_mtc, actual_mtc);
      final String actual_mcph = httpClientProps.getProperty(Connection.MAX_CONNECTIONS_PER_HOST);
View Full Code Here

Examples of org.jboss.soa.esb.helpers.ConfigTree

        transRes = transform(stringMessage, "Acme-Order-XML", "Acme", "AcmePartner2", "Partner2-Order-XML");
        assertEquals("<x><c>value</c></x>", transRes);
    }

    public void test_javabeans() throws ConfigurationException, ActionLifecycleException, ActionProcessingException {
        ConfigTree properties = new ConfigTree("smooks-config");
        SmooksTransformer transformer;
        Message message;

        properties.setAttribute(SmooksTransformer.RESOURCE_CONFIG, "/org/jboss/soa/esb/actions/converters/smooks-conf.xml");
        properties.setAttribute(SmooksTransformer.JAVA_OUTPUT, "ObjectMap");
        transformer = new SmooksTransformer(properties);
        transformer.initialise();

        // Perform the transformation by setting the payload on the task object...
        message = MessageFactory.getInstance().getMessage();
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.