Skip to content

Commit b54f385

Browse files
dmealingclaude
andcommitted
docs(core-spring): document OMDB virtual-thread safety + pinning audit result
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d5cd4b1 commit b54f385

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

server/java/core-spring/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,19 @@ Optional<MetaObject> user = metaDataService.findMetaObjectByNameOptional("User")
420420
- Automatic cleanup when Spring context shuts down
421421
- Minimal memory overhead for Spring integration
422422

423+
## Virtual threads (Java 21)
424+
425+
OMDB is a synchronous JDBC API and is safe to run on JVM virtual threads. An audit of
426+
the OMDB blocking paths found no `synchronized` monitor held across a JDBC call (the only
427+
synchronized methods guard in-memory state — the driver lazy-init, the event-listener
428+
list, and per-object attribute maps), so OMDB does not pin carrier threads.
429+
430+
To run a Spring Boot 3.2+ application's request handling on virtual threads, set:
431+
432+
spring.threads.virtual.enabled=true
433+
434+
The starter does not enable this for you — it is the application's choice.
435+
423436
---
424437

425438
**This Spring integration provides seamless MetaObjects functionality within Spring applications while maintaining all the framework's powerful features.**

0 commit comments

Comments
 (0)