What you’ll learn in this training
Virtual Threads, Structured Concurrency, and Scoped Values – with Project Loom, a new threading model is entering the Java world that makes concurrency simpler, clearer, and more scalable.
In this one-day training, you’ll learn how to build robust and high-performance applications with Project Loom – without having to wrestle with complex reactive frameworks, CompletableFuture chains, or cumbersome ExecutorService constructs. Instead of hard-to-read code, you’ll write clear, linear flows – with excellent scalability.
We start with the fundamentals: Why was Project Loom even necessary? What do Virtual Threads really offer – and where are their limits? You’ll learn how they work, what to watch out for, and how to integrate them effectively in Spring and Jakarta EE applications.
Next, you’ll dive into Structured Concurrency, still a preview feature in Java 21 – an API-based model that makes parallel tasks more structured, fault-tolerant, and maintainable. You’ll understand how task scopes work, how to handle cancellation, errors, and join strategies – and how to encapsulate concurrent processes in a clean, reusable way.
The course wraps up with Scoped Values, also a preview feature in Java 21 – a modern, thread-safe alternative to ThreadLocal, designed to fit seamlessly into the new threading model.
As always, the course is highly hands-on: You’ll work with plenty of code examples and exercises that help you apply what you learn directly in your own projects.
Target audience
This course is aimed at Java developers who want to implement modern concurrency in their applications in a maintainable and efficient way – without diving into the complexity of reactive frameworks.
Perfect for teams developing high-performance server applications – and looking to replace traditional threading models with simpler, scalable, and more maintainable alternatives – whether with Virtual Threads, Structured Concurrency, or Scoped Values – with immediate benefits for code readability, scalability, and debugging.
Agenda
We’ll cover the topics with a practical focus and a balanced mix of theory and hands-on exercises – so you can immediately understand and apply the concepts to your own applications.
Introduction to Project Loom:
- Motivation and goals of Project Loom
- Limitations of the traditional thread model
- Downsides of existing solutions like
CompletableFuture or reactive frameworks
Virtual Threads:(Background knowledge: Virtual Threads in Java – Deep Dive with Examples)
- What are virtual threads?
- Differences from platform threads
- Scalability and resource usage
- Limitations
- Best practices, tools (e.g., thread dumps), and useful use cases
- Practical examples with Spring and Jakarta EE
Structured Concurrency (Preview):(Background knowledge: Structured Concurrency with StructuredTaskScope)
- From unstructured to structured concurrency
- Implementing structured concurrency with
StructuredTaskScope - Error handling, join strategies, cancellation
- Nesting and reusability
Scoped Values (Preview):(Background knowledge: Scoped Values in Java)
- Passing contextual data in a safe and thread-safe way
- How scoped values differ from
ThreadLocal - Integration with
StructuredTaskScope
Conclusion & Outlook:
- When and how to make the most of Loom in your projects
- Future developments in the field of concurrency
Agenda as PDF