Multi-thread programming tips

You may be sharing a Connection among multiple threads because you have experienced poor concurrency using separate transactions.

Here are some tips for increasing concurrency:

In addition, some programmers might share a statement among multiple threads to avoid the overhead of each thread's having its own. Using the single statement cache, threads can share the same statement from different connections. For more information, see "Using the statement cache" in Tuning Derby.

Related concepts
Pitfalls of sharing a connection among threads
Related reference
Example of threads sharing a statement