Skip to content

Conversation

@OndroMih
Copy link
Contributor

@OndroMih OndroMih commented Jan 2, 2026

This requires a new release of Grizzly 5.0, with this merged: eclipse-ee4j/glassfish-grizzly#2271

Adds support for a new "virtual" argument to thread pools - if true, GlassFish will switch to the built-in virtual thread pool provided by Grizzly.
Also allow specifying a class for the thread pool directly in the create-threadpool admin command.
Support monitoring for virtual threads.
Run monitoring test suite also for virtual threads.

EDIT, dmatej: As the Grizzly 5 is a major version, OSGI doesn't like it in combination with older dependencies which declare a version range usually [3.0, 5.0). Therefore we need to update and release these projects too, ideally preventing it to happen again ever. Following PRs much be merged and projects released:

TBD: Would be good if those projects would deploy to Maven Central Snapshots too.

Note about OSGI ranges - Claude AI suggests incorrect solutions, while old SO is correct: https://stackoverflow.com/questions/8353771/osgi-valid-version-ranges/8354987#8354987

@OndroMih OndroMih force-pushed the ondromih-2025-12-virtual-threads-grizzly branch from 401ca7d to 454e28d Compare January 4, 2026 13:30
@OndroMih OndroMih added the New feature A major new user functionality was added label Jan 10, 2026
Requires Grizzly snapshot build until Grizzly 5.0 is released.
Apply virtual threads by setting the thread pool class name to "org.glassfish.grizzly.threadpool.VirtualThreadExecutorService"

To do:
- the "Load defaults" button in Admin Console doesn't work - it doesn't restore the default class name to use platform threads
- enable virtual threads by a checkbox or allow selecting class name from a drop down from the 2 known types. Asadmin could support another argument that specifies the type of the pool instead of classname
- enable to reset to defaults, either by an empty class name or by the load defaults button in Admin Console
- monitoring doesn't work for the virtual threads pool

License headers
Change the impl to only use a single default thread pool classname. When classname is empty or default value, then decide based on virtual argument, do not set another classname.
Based on Grizzly branch ondromih-virtualthread
@dmatej dmatej force-pushed the ondromih-2025-12-virtual-threads-grizzly branch from 34b994f to b74c1d4 Compare January 12, 2026 22:51
@dmatej dmatej self-assigned this Jan 12, 2026
@dmatej dmatej added this to the 8.0.0 milestone Jan 12, 2026
@dmatej dmatej changed the title Integrate Grizzly virtual thread pool - support for virtual threads for HTTP and IIOP requests Integrate Grizzly 5 virtual thread pool - support for virtual threads for HTTP and IIOP requests Jan 12, 2026
- These dependencies have to upgrade and release too, because their OSGI range
  blocks major changes.

Signed-off-by: David Matějček <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Admin Console Relates to the Admin Console UI Component: Thread pools New feature A major new user functionality was added

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants