Forum: Building VoltDB Clients

Post: About java driver

About java driver
Mar 4, 2013
I have some questoins about java driver for web develop:
1. is thread save?
2. is has connection pool?
3. need to close connection after async call procedure?
Mar 4, 2013

The java driver Client class is thread-safe. If you review the examples/voter/src/voter/ code, you can see that one Client object is used simultaneously by many threads. For this reason, it is generally not necessary to use connection pooling.

The connection only needs to be closed before the client application exits, not after async call procedure. The examples/voter/src/voter/ class has examples of async calls. You might also want to review some further examples on Volt Labs (

The "stored_value_cards" example ( has a reusable BenchmarkCallback class which includes atomic counters for multiple stored procedures. This example is similar in operation to the voter benchmark, but may be easier to modify for your own use case.

Mar 5, 2013
Thanks for answer!