Description: JDBC allows you to share a single Connection among multiple threads.
Keywords: Multiple threads sharing single connection

# Working with multiple threads sharing a single connection

JDBC allows you to share a single Connection among multiple threads.

- Pitfalls of sharing a connection among threads
  Here is a review of the potential pitfalls of sharing a single Connection among multiple threads.
- Multi-thread programming tips
  You may be sharing a Connection among multiple threads because you have experienced poor concurrency using separate transactions.
- Example of threads sharing a statement
  This example shows what can happen if two threads try to share a single Statement.

Parent topic: Controlling Derby application behavior
Related concepts
The JDBC Connection and Transaction Model
Result set and cursor mechanisms
Locking, concurrency, and isolation
Working with multiple connections to a single database
Working with database threads in an embedded environment
Working with Derby SQLExceptions in an application