Skip to content

Integrate Grizzly 5 virtual thread pool - support for virtual threads for HTTP and IIOP requests#25859

Merged
dmatej merged 18 commits intomainfrom
ondromih-2025-12-virtual-threads-grizzly
Jan 31, 2026
Merged

Integrate Grizzly 5 virtual thread pool - support for virtual threads for HTTP and IIOP requests#25859
dmatej merged 18 commits intomainfrom
ondromih-2025-12-virtual-threads-grizzly

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:

Deployments of dependencies to Maven Central Snapshots:

Deployments of final dependencies to Maven Central

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
@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
@dmatej dmatej force-pushed the ondromih-2025-12-virtual-threads-grizzly branch from 4332056 to 6bcf1a3 Compare January 13, 2026 11:23
@dmatej dmatej force-pushed the ondromih-2025-12-virtual-threads-grizzly branch from 6bcf1a3 to d14f797 Compare January 19, 2026 15:30
@dmatej
Copy link
Contributor

dmatej commented Jan 19, 2026

Here we go, so now we need to release our dependencies ...

@dmatej dmatej force-pushed the ondromih-2025-12-virtual-threads-grizzly branch from db42a7e to c9c3ac5 Compare January 22, 2026 23:16
OndroMih and others added 14 commits January 26, 2026 19:13
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
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
- These dependencies have to upgrade and release too, because their OSGI range
  blocks major changes.

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
…plugin

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
@dmatej dmatej force-pushed the ondromih-2025-12-virtual-threads-grizzly branch from 2cdbcd9 to db6868a Compare January 26, 2026 18:14
arjantijms and others added 2 commits January 30, 2026 15:07
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
@dmatej dmatej marked this pull request as ready for review January 31, 2026 12:11
@dmatej dmatej merged commit a860065 into main Jan 31, 2026
6 checks passed
@dmatej dmatej deleted the ondromih-2025-12-virtual-threads-grizzly branch January 31, 2026 15:15
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