Package com.tll.config

Examples of com.tll.config.Config


  @Override
  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();
    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


  @Override
  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();
    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

    }

  }

  public void testAcegiModuleLoad() throws Exception {
    final Config config = Config.load();
    final Injector i = Guice.createInjector(new Module() {

      @Override
      public void configure(Binder binder) {
        // ad hoc UserCache impl
View Full Code Here

  @Override
  protected void beforeClass() {
    // create the db shell first (before test injector creation) to avoid db4o
    // file lock when objectcontainer is instantiated
    final Config cfg = new Config();
    cfg.addProperty(Db4oDaoModule.ConfigKeys.DB4O_FILENAME.getKey(), getConfig().getProperty(
        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();
View Full Code Here

   * Constructor
   */
  public Db4oDbShellTest() {
    super();
    // kill the existing db4o file if present
    final Config cfg = Config.load();
    final Injector i = buildInjector(new TestPersistenceUnitModelModule(), new TestDb4oDaoModule(cfg));
    final File f = new File(i.getInstance(Key.get(URI.class, Db4oFile.class)));
    f.delete();
  }
View Full Code Here

TOP

Related Classes of com.tll.config.Config

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.