Package com.tll.dao

Examples of com.tll.dao.IDbShell


    servletContext.setAttribute(KEY, oc);

    // re-stub the db
    log.info("re-stubbing test db..");
    final ObjectContainer dbref = injector.getInstance(ObjectContainer.class);
    final IDbShell dbs = injector.getInstance(IDbShell.class);
    dbs.restub(dbref);
  }
View Full Code Here


    // create the db shell first (before test injector creation) to avoid db4o
    // file lock when objectcontainer is instantiated
    final Config cfg = Config.load();
    cfg.setProperty(Db4oDaoModule.ConfigKeys.DB4O_EMPLOY_SPRING_TRANSACTIONS.getKey(), false);
    final Injector i = buildInjector(new TestDb4oDaoModule(cfg), new Db4oDbShellModule() );
    final IDbShell dbs = i.getInstance(IDbShell.class);
    dbs.delete();
    dbs.create();

    super.beforeClass();
  }
View Full Code Here

  protected void beforeClass() {
    // create the db shell first (before test injector creation) to avoid db4o
    // file lock when objectcontainer is instantiated
    final Config cfg = getConfig();
    final Injector i = buildInjector(new TestDb4oDaoModule(cfg), new Db4oDbShellModule() );
    final IDbShell dbs = i.getInstance(IDbShell.class);
    dbs.drop();
    dbs.create();

    super.beforeClass();
  }
View Full Code Here

    });
    modules.add(new Db4oDbShellModule());
  }
 
  public void test() throws Exception {
    final IDbShell db = injector.getInstance(IDbShell.class);
    Assert.assertTrue(db instanceof Db4oDbShell);
    db.create();
    db.addData();
    db.drop();
  }
View Full Code Here

            return Db4oDbShell.getDb4oClasspathFileRef(dbPath);
          }
        }).in(Scopes.SINGLETON);
      }
    }, new Db4oDbShellModule());
    IDbShell dbShell = i.getInstance(IDbShell.class);
    dbShell.drop();
    dbShell.create();
  }
View Full Code Here

            return Db4oDbShell.getDb4oClasspathFileRef(dbPath);
          }
        }).in(Scopes.SINGLETON);
      }
    }, new Db4oDbShellModule());
    IDbShell dbShell = i.getInstance(IDbShell.class);
    dbShell.drop();
    dbShell.create();
    super.beforeClass();
  }
View Full Code Here

            return Db4oDbShell.getDb4oClasspathFileRef(dbPath);
          }
        }).in(Scopes.SINGLETON);
      }
    }, new Db4oDbShellModule());
    IDbShell dbShell = i.getInstance(IDbShell.class);
    dbShell.drop();
    dbShell.create();
    super.beforeClass();
  }
View Full Code Here

    // create the db shell first (before test injector creation) to avoid db4o
    // file lock when objectcontainer is instantiated
    final Config cfg = getConfig();
    cfg.setProperty(Db4oDaoModule.ConfigKeys.DB4O_EMPLOY_SPRING_TRANSACTIONS.getKey(), false);
    final Injector i = buildInjector(new TestDb4oDaoModule(cfg), new Db4oDbShellModule() );
    final IDbShell dbs = i.getInstance(IDbShell.class);
    dbs.delete();
    dbs.create();

    cfg.setProperty(Db4oDaoModule.ConfigKeys.DB4O_EMPLOY_SPRING_TRANSACTIONS.getKey(), true);
    super.beforeClass();
    injector.getInstance(PlatformTransactionManager.class)// bind @Transactional
  }
View Full Code Here

    // create the db shell first (before test injector creation) to avoid db4o
    // file lock when objectcontainer is instantiated
    final Config cfg = getConfig();
    cfg.setProperty(Db4oDaoModule.ConfigKeys.DB4O_EMPLOY_SPRING_TRANSACTIONS.getKey(), false);
    final Injector i = buildInjector(new SmbizDb4oDaoModule(cfg), new Db4oDbShellModule(), new SmbizModelModule(), new SmbizEGraphModule());
    final IDbShell dbs = i.getInstance(IDbShell.class);
    dbs.restub();

    cfg.setProperty(Db4oDaoModule.ConfigKeys.DB4O_EMPLOY_SPRING_TRANSACTIONS.getKey(), true);
    super.beforeClass();
  }
View Full Code Here

        Db4oDaoModule.ConfigKeys.DB4O_FILENAME.getKey()));
    cfg.addProperty(Db4oDaoModule.ConfigKeys.DB_TRANS_TIMEOUT.getKey(), getConfig().getProperty(
        Db4oDaoModule.ConfigKeys.DB_TRANS_TIMEOUT.getKey()));
    cfg.setProperty(Db4oDaoModule.ConfigKeys.DB4O_EMPLOY_SPRING_TRANSACTIONS.getKey(), false);
    final Injector i = buildInjector(new SmbizDb4oDaoModule(cfg), new Db4oDbShellModule());
    final IDbShell dbs = i.getInstance(IDbShell.class);

    dbs.delete();
    dbs.create();
    super.beforeClass();
  }
View Full Code Here

TOP

Related Classes of com.tll.dao.IDbShell

Copyright © 2018 www.massapicom. 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.