Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.DefaultConfigurationBuilder.load()


                    interpolator.addValueSource( new PropertiesBasedValueSource( System.getProperties() ) );

                    String interpolatedProps = interpolator.interpolate( properties );

                    logger.debug( "Loading configuration into commons-configuration, xml {}", interpolatedProps );
                    builder.load( new StringReader( interpolatedProps ) );
                    configuration = builder.getConfiguration( false );
                    configuration.setExpressionEngine( expressionEngine );
                    //configuration.set
                }
                catch ( InterpolationException e )
View Full Code Here


                    interpolator.addValueSource( new PropertiesBasedValueSource( System.getProperties() ) );

                    String interpolatedProps = interpolator.interpolate( properties );

                    logger.debug( "Loading configuration into commons-configuration, xml {}", interpolatedProps );
                    builder.load( new StringReader( interpolatedProps ) );
                    configuration = builder.getConfiguration( false );
                    configuration.setExpressionEngine( expressionEngine );
                    //configuration.set
                }
                catch ( InterpolationException e )
View Full Code Here

    protected void setUp() throws Exception {
        dnsServer = new TestableDNSServer();
        DefaultConfigurationBuilder db = new DefaultConfigurationBuilder();

        db.load(new ByteArrayInputStream("<dnsserver><autodiscover>true</autodiscover><authoritative>false</authoritative></dnsserver>".getBytes()));
        dnsServer.setLog(new SimpleLog("MockLog"));
        dnsServer.configure(db);
        dnsServer.init();
       
       
View Full Code Here

        sb.append("</mailet>");

        sb.append("</processor>");

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        builder.load(new ByteArrayInputStream(sb.toString().getBytes()));
        return builder;
    }

    @Test
    public void testSimpleRouting() throws Exception {
View Full Code Here

            sb.append("\"/>");
        }
    sb.append("</processors>");

    DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
    builder.load(new ByteArrayInputStream(sb.toString().getBytes()));
    return builder;
    }
}
View Full Code Here

    @Before
    public void setUp() throws Exception {
        dnsServer = new TestableDNSServer();
        DefaultConfigurationBuilder db = new DefaultConfigurationBuilder();

        db.load(new ByteArrayInputStream(DNS_SERVER_CONFIG));

        dnsServer.setLog(LoggerFactory.getLogger(DNSJavaServiceTest.class));
        dnsServer.configure(db);
        dnsServer.init();
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.