Introduction to Oracle JDBC 21c Driver Support for Virtual Threads
This blog post introduces Oracle’s JDBC 21c Driver support for Virtual Threads.
Oracle has built its JDBC Driver from version 188.8.131.52 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:
- 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.
It will help your applications leverage your infrastructure-related resources and capacity…