1

I'm using Neo4j Java Driver and I was trying to create a connection pool. This is the driver that I added:

    <dependency>
      <groupId>org.neo4j.driver</groupId>
      <artifactId>neo4j-java-driver</artifactId>
      <version>1.1.1</version>
   </dependency>

I tried to use this code to create a Config for the Connection Pool but I guess it's not available in the driver version that I'm using since the methods were not recognized.

Config config = Config.builder()
        .withMaxConnectionLifetime(30, TimeUnit.MINUTES)
        .withMaxConnectionPoolSize(50)
        .withConnectionAcquisitionTimeout(2, TimeUnit.MINUTES)
        .build();
driver = GraphDatabase.driver(uri, AuthTokens.basic(user, password), config);

Any idea of how I can create a connection pool in my driver version?

0 Answers0