Member-only story
Introduction to Oracle JDBC Driver Support for Virtual Threads

Introduction
This blog post introduces Oracle’s JDBC Driver support for Virtual Threads.
Oracle has built its JDBC Driver from version 21c and newer versions 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 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:
- Coming to Java 19: Virtual threads and platform threads
- Going inside Java’s Project Loom and virtual threads
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…