Examples of ChainedProperties


Examples of org.kie.internal.utils.ChainedProperties

            throw new RuntimeException("Multiple classloaders are no longer supported");
        }
        this.classLoader = ProjectClassLoader.getClassLoader(classLoaders == null || classLoaders.length == 0 ? null : classLoaders[0], getClass(), false);

        this.immutable = false;
        this.chainedProperties = new ChainedProperties( "session.conf",
                                                        this.classLoader );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
        }
View Full Code Here

Examples of org.kie.internal.utils.ChainedProperties

        }
        return javaVersion;
    }

    private static void findJavaVersion(ClassLoader classLoader) {
        ChainedProperties chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                                     classLoader,
                                                                     true );

        if (chainedProperties.getProperty("drools.dialect.java", null) == null) {
            chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                       ClassGenerator.class.getClassLoader(),
                                                       true );
        }

        javaVersion = findJavaVersion(chainedProperties);
View Full Code Here

Examples of org.kie.internal.utils.ChainedProperties

        init( properties );
    }

    private void init(Properties properties) {

        this.chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                        getClassLoader(),
                                                        true );

        if (chainedProperties.getProperty("drools.dialect.java", null) == null) {
            // if it couldn't find a conf for java dialect using the project class loader
            // it means it could not load the conf file at all (very likely it is running in
            // an osgi environement) so try with the class loader of this class
            this.chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                            getClass().getClassLoader(),
                                                            true );

            if (this.classLoader instanceof ProjectClassLoader) {
                ((ProjectClassLoader) classLoader).setDroolsClassLoader(getClass().getClassLoader());
View Full Code Here

Examples of org.kie.internal.utils.ChainedProperties

        this.classLoader = ClassLoaderUtil.getClassLoader( classLoader,
                                                           getClass(),
                                                           false );

        this.immutable = false;
        this.chainedProperties = new ChainedProperties( "session.conf",
                                                        this.classLoader );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
        }
View Full Code Here

Examples of org.kie.internal.utils.ChainedProperties

    }
   
    private void init(Properties properties) {
        this.immutable = false;

        this.chainedProperties = new ChainedProperties( "rulebase.conf",
                                                        this.classLoader,
                                                        true );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
View Full Code Here

Examples of org.kie.internal.utils.ChainedProperties

    }
   
    private void init(Properties properties) {
        this.immutable = false;

        this.chainedProperties = new ChainedProperties( "rulebase.conf",
                                                        this.classLoader,
                                                        true );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
View Full Code Here

Examples of org.kie.internal.utils.ChainedProperties

    }

    @Test
    public void testIgnoreDefaults() {
        // check standard chained properties, that includes defaults
        ChainedProperties chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                                     getClass().getClassLoader(),
                                                                     true );
        //System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
        //                                                   null ) );
        assertNotNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
                                                      null ) );

        // now check that chained properties can ignore defaults
        chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                   getClass().getClassLoader(),
                                                   false );
        //System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
        //                                                   null ) );
        assertNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
                                                   null ) );

        // now check it can find defaults again.
        chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                   getClass().getClassLoader(),
                                                   true );
        //System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
        //                                                   null ) );
        assertNotNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
                                                      null ) );
    }
View Full Code Here

Examples of org.kie.internal.utils.ChainedProperties

        init(properties);
    }

    private void init(Properties properties) {

        this.chainedProperties = new ChainedProperties("packagebuilder.conf",
                getClassLoader(),
                true);

        if (chainedProperties.getProperty("drools.dialect.java", null) == null) {
            // if it couldn't find a conf for java dialect using the project class loader
            // it means it could not load the conf file at all (very likely it is running in
            // an osgi environement) so try with the class loader of this class
            this.chainedProperties = new ChainedProperties("packagebuilder.conf",
                    getClass().getClassLoader(),
                    true);

            if (this.classLoader instanceof ProjectClassLoader) {
                ((ProjectClassLoader) classLoader).setDroolsClassLoader(getClass().getClassLoader());
View Full Code Here

Examples of org.kie.internal.utils.ChainedProperties

    }

    @Test
    public void testIgnoreDefaults() {
        // check standard chained properties, that includes defaults
        ChainedProperties chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                                     getClass().getClassLoader(),
                                                                     true );
        //System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
        //                                                   null ) );
        assertNotNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
                                                      null ) );

        // now check that chained properties can ignore defaults
        chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                   getClass().getClassLoader(),
                                                   false );
        //System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
        //                                                   null ) );
        assertNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
                                                   null ) );

        // now check it can find defaults again.
        chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                   getClass().getClassLoader(),
                                                   true );
        //System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
        //                                                   null ) );
        assertNotNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
                                                      null ) );
    }
View Full Code Here

Examples of org.kie.util.ChainedProperties

    }
   
    private void init(Properties properties) {
        this.immutable = false;

        this.chainedProperties = new ChainedProperties( "rulebase.conf",
                                                        this.classLoader,
                                                        true );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
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.