Skip to content

Commit

Permalink
Make session related config not reconfigure the driver.
Browse files Browse the repository at this point in the history
There is now a BoltDriver#configureSessionConfig method in place that does only
touch the session related config.
  • Loading branch information
meistermeier authored and michael-simons committed Oct 16, 2023
1 parent b2e8e8f commit e295011
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,20 @@ public void configure(Configuration newConfiguration) {

this.driverConfig = buildDriverConfig();
this.credentials = this.configuration.getCredentials();
this.database = this.configuration.getDatabase();
this.databaseSelectionProvider = this.configuration.getDatabaseSelectionProvider();
this.userSelectionProvider = this.configuration.getUserSelectionProvider();

configureSessionConfig(newConfiguration);
if (this.configuration.getVerifyConnection()) {
checkDriverInitialized();
}
}

public void configureSessionConfig(Configuration newConfiguration) {
// since it is still possible that the BoltDriver will get recreated, we have to persist the given config
this.configuration = newConfiguration;
this.database = this.configuration.getDatabase();
this.databaseSelectionProvider = this.configuration.getDatabaseSelectionProvider();
this.userSelectionProvider = this.configuration.getUserSelectionProvider();
}

@Override
protected String getTypeSystemName() {
return "org.neo4j.ogm.drivers.bolt.types.BoltNativeTypes";
Expand Down

0 comments on commit e295011

Please sign in to comment.