Examples of loadFromProperties()


Examples of com.avaje.ebean.config.ServerConfig.loadFromProperties()

    public static EbeanServer create() {
       
       
        ServerConfig config = new ServerConfig();
        config.setName("h2");
        config.loadFromProperties();
        config.setName("modifiedH2");
       
        config.addClass(ROrder.class);
        config.addClass(ROrderPK.class);
        config.addClass(RCustomer.class);
View Full Code Here

Examples of com.avaje.ebean.config.ServerConfig.loadFromProperties()

    public static void main(String[] args) {

        ServerConfig cfg = new ServerConfig();
        cfg.setName("h2");
        cfg.loadFromProperties();
        cfg.addClass(EBasic.class);

        // .... other settings ...
        //UnderscoreNamingConvention naming = new UnderscoreNamingConvention();
        //naming.setSchema("test");
View Full Code Here

Examples of com.avaje.ebean.config.ServerConfig.loadFromProperties()

    oraDb.setPassword("junk");
    oraDb.setUrl("jdbc:oracle:thin:junk/junk@localhost:1521:XE");
    oraDb.setHeartbeatSql("select count(*) from dual");
   
   
    c.loadFromProperties();
    c.setDdlGenerate(true);
    c.setDdlRun(true);
    c.setDefaultServer(false);
    c.setRegister(false);
    c.setDataSourceConfig(oraDb);
View Full Code Here

Examples of com.avaje.ebean.config.ServerConfig.loadFromProperties()

    postgresDb.setUsername("test");
    postgresDb.setPassword("test");
    postgresDb.setUrl("jdbc:postgresql://127.0.0.1:5432/test");
    postgresDb.setHeartbeatSql("select count(*) from t_one");
   
    c.loadFromProperties();
    c.setDdlGenerate(true);
    c.setDdlRun(true);
    c.setDefaultServer(false);
    c.setRegister(false);
    c.setDataSourceConfig(postgresDb);
View Full Code Here

Examples of com.avaje.ebean.config.ServerConfig.loadFromProperties()

  @Test
  public void test() {
   
    ServerConfig config = new ServerConfig();
    config.setName("h2autocommit");
    config.loadFromProperties();
   
    config.addClass(UTDetail.class);
    config.setDdlGenerate(true);
    config.setDdlRun(true);
    config.setAutoCommitMode(true);
View Full Code Here

Examples of com.avaje.ebean.config.ServerConfig.loadFromProperties()

  public ServerConfig build(String serverName) {
   
    ServerConfig config = new ServerConfig();
    config.setName(serverName)
   
    config.loadFromProperties();
   
    return config;
  }
 
 
View Full Code Here

Examples of com.avaje.ebean.config.ServerConfig.loadFromProperties()

  @SuppressWarnings({ "unchecked", "rawtypes" })
  private static EbeanServer createServer(String name, DataSource dataSource)
  {
    EbeanServer result = null;
    ServerConfig cfg = new ServerConfig();
    cfg.loadFromProperties();
    cfg.setName(name);
    cfg.setClasses((List) Play.classloader.getAllClasses());
    cfg.setDataSource(new EbeanDataSourceWrapper(dataSource));
    cfg.setRegister("default".equals(name));
    cfg.setDefaultServer("default".equals(name));
View Full Code Here

Examples of com.avaje.ebean.config.ServerConfig.loadFromProperties()

            if (ebeanConf != null) {
                for (String key: ebeanConf.keys()) {

                    ServerConfig config = new ServerConfig();
                    config.setName(key);
                    config.loadFromProperties();
                    try {
                        config.setDataSource(new WrappingDatasource(dbApi.getDatabase(key).getDataSource()));
                    } catch(Exception e) {
                        throw ebeanConf.reportError(
                            key,
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.