/* (non-Javadoc)
  * @see org.openrdf.repository.RepositoryConnectionTest#createRepository()
  */
 @Override
 protected Repository createRepository() throws Exception {
   config.setDefaultContext(null);
   KiWiStore store = new KiWiStore(config);
   store.setDropTablesOnShutdown(true);
   return new SailRepository(store);
 }
示例#2
0
  @Override
  public void initialize() throws SailException {
    synchronized (this) {
      if (!initialized) {
        super.initialize();

        KiWiStore store = getBaseStore();

        try {
          persistence = new KiWiReasoningPersistence(store.getPersistence(), getValueFactory());
          persistence.initDatabase();

          engine = new ReasoningEngine(persistence, this, config);
          addTransactionListener(engine);

          initialized = true;
        } catch (SQLException e) {
          log.error("error initializing reasoning database", e);
          throw new SailException("error initializing reasoning database", e);
        }
      }
    }
  }