JDBC - Multithreading

Jdbc Class Architecture

About

Java multithreading in JDBC

Each thread needs its own JDBC connection

Oracle: Controlled serial access to a connection, such as that provided by connection caching, is both necessary and encouraged.

Oracle strongly discourages sharing a database connection among multiple threads. Avoid allowing multiple threads to access a connection simultaneously. If multiple threads must share a connection, use a disciplined begin-using/end-using protocol.

Connections can't be shared between threads because each connection is also a transaction.

Documentation / Reference







Share this page:
Follow us:
Task Runner