Examples of ChainedProperties


Examples of org.drools.util.ChainedProperties

    }
   
    public DefaultEscalatedDeadlineHandler() {
        handler = new EmailWorkItemHandler();
       
        ChainedProperties conf = new ChainedProperties("drools.email.conf",  ClassLoaderUtil.getClassLoader( null, getClass(), false ) );
        String host = conf.getProperty( "host", null );
        String port = conf.getProperty( "port", "25" );
       
        from = conf.getProperty( "from", null );
        replyTo = conf.getProperty( "replyTo", null );
       
        handler.setConnection( host, port, null, null );
    }
View Full Code Here

Examples of org.drools.util.ChainedProperties

        }
        return instance;
    }

    SendIcal() {
        ChainedProperties conf = new ChainedProperties( "drools.email.conf",ClassLoaderUtil.getClassLoader( null, getClass(), false ) );
        String host = conf.getProperty( "mail.smtp.host",
                                        "localhost" );
        String port = conf.getProperty( "mail.smtp.port",
                                        "25" );

        connection = new Properties();
        connection.setProperty( "mail.transport.protocol",
                                "smtp" );

        if ( host != null && host.trim().length() > 0 ) {
            connection.setProperty( "mail.smtp.host",
                                    host );
        }
        if ( port != null && port.trim().length() > 0 ) {
            connection.setProperty( "mail.smtp.port",
                                    port );
        }

        defaultLanguage = conf.getProperty( "defaultLanguage",
                                            "en-UK" );
    }
View Full Code Here

Examples of org.drools.util.ChainedProperties

    String emailHost;
    String emailPort;
   
    @Override
    protected void setUp() throws Exception {
        ChainedProperties props = new ChainedProperties( "email.conf", ClassLoaderUtil.getClassLoader( null, getClass(), false ));
        emailHost = props.getProperty( "host", "localhost" );
        emailPort = props.getProperty( "port", "2345" );
       
        wiser = new Wiser();
        wiser.setHostname( emailHost );
        wiser.setPort( Integer.parseInt( emailPort ) );
        wiser.start();
View Full Code Here

Examples of org.drools.util.ChainedProperties

   
    this.context = EasyMock.createMock(Context.class);
    EasyMock.expect(context.lookup("ConnectionFactory")).andReturn(factory).anyTimes();
    EasyMock.replay(context);
   
    ChainedProperties props = new ChainedProperties("process.email.conf", ClassLoaderUtil.getClassLoader(null, getClass(), false ));
        setEmailHost(props.getProperty("host", "locahost"));
        setEmailPort(props.getProperty("port", "2345"));   
   
    Properties serverProperties = new Properties();
    serverProperties.setProperty("JMSTaskServer.connectionFactory", "ConnectionFactory");
    serverProperties.setProperty("JMSTaskServer.transacted", "true");
    serverProperties.setProperty("JMSTaskServer.acknowledgeMode", "AUTO_ACKNOWLEDGE");
View Full Code Here

Examples of org.drools.util.ChainedProperties

    @Override @BeforeClass
    protected void setUp() throws Exception {
        super.setUp();
       
        ChainedProperties props = new ChainedProperties("process.email.conf", ClassLoaderUtil.getClassLoader(null, getClass(), false ));
        setEmailHost(props.getProperty("host", "locahost"));
        setEmailPort(props.getProperty("port", "2345"));       
       
        server = new HornetQTaskServer(taskService, 5446);
        Thread thread = new Thread(server);
        thread.start();
    System.out.println("Waiting for the HornetQTask Server to come up");
View Full Code Here

Examples of org.drools.util.ChainedProperties

  @Override
  protected void setUp() throws Exception {
    super.setUp();

    ChainedProperties props = new ChainedProperties("process.email.conf", ClassLoaderUtil.getClassLoader(null, getClass(), false) );
    setEmailHost(props.getProperty("host", "locahost"));
    setEmailPort(props.getProperty("port", "2345"));       

    server = new MinaTaskServer(taskService);
    Thread thread = new Thread(server);
    thread.start();
    System.out.println("Waiting for the MinaTask Server to come up");
View Full Code Here

Examples of org.drools.util.ChainedProperties

    private void init(Properties properties,
                      ClassLoader... classLoaders) {
        setClassLoader( classLoaders );

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

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

Examples of org.drools.util.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.drools.util.ChainedProperties

            this.classLoader = Thread.currentThread().getContextClassLoader();
        } else {
            this.classLoader = this.getClass().getClassLoader();
        }

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

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

Examples of org.drools.util.ChainedProperties

    }

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

        this.chainedProperties = new ChainedProperties( "session.conf" );

        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.