Skip to content

Commit

Permalink
[TIM-617] Bugfix Use the database when needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Maas committed Dec 3, 2015
1 parent e19603e commit 4742c76
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ protected void configure() {

@Override
protected void bindGraph() {
bind(Graph.class).to(TinkerGraph.class);
if (useDatabase) {
super.bindGraph();
} else {
bind(Graph.class).to(TinkerGraph.class);
}
}

@Singleton
Expand All @@ -113,7 +117,7 @@ public OaiPmhRestClient providesOaiPmhRestClient() {
@Singleton
PersistenceManager providePersistenceManager() throws PersistenceManagerCreationException {
PersistenceManager persistenceManager = PersistenceManagerFactory.newPersistenceManager(config.getBooleanSetting("handle.enabled", true), config.getSetting("handle.cipher"),
config.getSetting("handle.naming_authority"), config.getSetting("handle.prefix"), config.getSetting("handle.private_key_file"));
config.getSetting("handle.naming_authority"), config.getSetting("handle.prefix"), config.getSetting("handle.private_key_file"));
return persistenceManager;
}

Expand Down

0 comments on commit 4742c76

Please sign in to comment.