Introduction to Oracle JDBC 21c Driver Support for Virtual Threads

Juarez Junior
Oracle Developers
Published in
5 min readOct 24, 2022

Develop Java apps with Oracle Database

by Juarez Junior


This blog post introduces Oracle’s JDBC 21c Driver support for Virtual Threads.

Oracle has built its JDBC Driver from version to support synchronous JDBC access using virtual (lightweight) threads.

This step-by-step guide is not an extensive introduction to Virtual Threads but a straightforward guide on utilizing Oracle’s JDBC 21c support to Virtual Threads with the JDBC API and synchronous (blocking calls) specifically.

Given that, it’s time to get started!

A quick introduction to Project Loom and Java Virtual Threads

Project Loom is an umbrella project intended to define, incubate and deliver Java VM features to support easy-to-use, high-throughput lightweight concurrency and new programming models on the Java platform. Per the JDK release process, features in Project Loom were broken down into several JEPs (JDK Enhancement Proposals) and made available in different JDK releases.

A targeted feature is the addition of Virtual Threads to the Java platform. Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications. JDK 19 included Virtual Threads as a preview API.

If you need an introduction to Virtual Threads, please check the blog posts below:

Why should Java and database developers care about Virtual Threads?

To leverage improved resource efficiency and better processing throughput benefits, developers don’t have to refactor simple blocking JDBC calls into Reactive Streams calls that are hard to create, maintain and debug anymore.

Our sample source code now uses Java Virtual Threads with the JDBC API, as it demonstrates a new approach.

It will help your applications leverage your infrastructure-related resources and capacity…

Juarez Junior
Oracle Developers

Senior Principal #Java Developer Evangelist @ Oracle. Invite me to speak about #Java #OracleDatabase #OracleCloud #Blockchain #DevRel ☕️🥑

Recommended from Medium


See more recommendations