You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using this driver in an application project, we recommend **a single driver** during the whole lifetime of the application
51
-
to benefit from the connection pool maintained in the `driver` object.
52
58
53
-
The `driver` object holds a connection pool to avoid performance overhead added by establishing TCP connections for each query run.
54
-
Network connections are established on demands when running Cypher queries, and returned back to connection pool after query execution finishes.
55
-
As a result, it is expensive to create and close driver, while super cheap to open and close sessions.
59
+
For full applications, a single ``Driver`` object should be created with application-wide scope and lifetime.
60
+
This allows full utilization of the driver connection pool.
61
+
The connection pool reduces network overhead added by sharing TCP connections between subsequent transactions.
62
+
Network connections are acquired on demand from the pool when running Cypher queries, and returned back to connection pool after query execution finishes.
63
+
As a result of this design, it is expensive to create and close a ``Driver`` object.
64
+
``Session`` objects, on the other hand, are very cheap to use.
56
65
57
-
The driver is thread-safe, but the session or transaction is not thread-safe.
58
-
So make sure make sure `Session` and `Transaction` objects are not used concurrently by multiple threads.
59
66
60
-
### More Manual and Documents
67
+
### Thread Safety
68
+
69
+
``Driver`` objects are thread-safe, but ``Session`` and ``Transaction`` objects should only be used by a single thread.
70
+
71
+
72
+
### Further reading
61
73
Check out our [Wiki](https://github.com/neo4j/neo4j-java-driver/wiki) for detailed and most up-to-date developer manuals, driver API documentations, changelogs, etc.
62
74
75
+
63
76
### Bug Report
64
-
If you encounter any bugs while using this driver, please following the instructions in our [Contributing Criteria](https://github.com/neo4j/neo4j-java-driver/blob/1.6/CONTRIBUTING.md#need-to-raise-an-issue)
77
+
If you encounter any bugs while using this driver, please follow the instructions in our [Contribution Guide](https://github.com/neo4j/neo4j-java-driver/blob/1.6/CONTRIBUTING.md#need-to-raise-an-issue)
65
78
when raising an issue at [Issues](https://github.com/neo4j/neo4j-java-driver/issues).
66
79
67
-
When reporting, please mention the version of the driver and version of the server, the setup of the server such as single instance or HA or causal cluster,
68
-
the error stacktrace, code snippet to reproduce the error if possible, and anything that you think it is helpful to reproduce the error.
80
+
When reporting, please mention the versions of the driver and server, as well as the server topology (single instance, causal cluster, etc).
81
+
Also include any error stacktraces and a code snippet to reproduce the error if possible, as well as anything else that you think might be helpful.
82
+
69
83
70
84
## For Driver Developers
85
+
71
86
This section targets at people who would like to compile the source code on their own machine for the purpose of, for example, contributing a PR to this repository.
72
87
Before contributing to this project, please take a few minutes and read our [Contributing Criteria](https://github.com/neo4j/neo4j-java-driver/blob/1.6/CONTRIBUTING.md#want-to-contribute).
0 commit comments