I use a Neo4j java driver in my play app.
Currently I initialize a new driver for every controller (ie. for every http call). When the autoclosable close method runs it seems to block the entire call for about almost two seconds. Running without closing the drivers (obviously a bad idea) cuts my tests down from 25 seconds to 5.
I do suspect I use the driver in the wrong way and I guess I should be using one driver application wide but cannot figure out how. What is the correct way to use the java Neo4j driver in the play framework?