Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Services are not initialized in a concurrent way at GlassFish startup #25214

Closed
tnagao7 opened this issue Nov 18, 2024 · 0 comments · Fixed by #25215
Closed

Services are not initialized in a concurrent way at GlassFish startup #25214

tnagao7 opened this issue Nov 18, 2024 · 0 comments · Fixed by #25215
Labels
bug Something isn't working
Milestone

Comments

@tnagao7
Copy link
Member

tnagao7 commented Nov 18, 2024

Environment Details

  • GlassFish Version (and build number): GlassFish 7.0.19
  • JDK version: OpenJDK 21.0.4
  • OS: Red Hat Enterprise Linux 8.6
  • Database: none

Problem Description

At the GlassFish startup, HK2 services (classes annotated with org.jvnet.hk2.annotations.Service) are not initialized in a concurrent way.
The expected behavior is that services are initialized by four RunLevelControllerThreads, as in GlassFish 7.0.0-M7 or earlier.

Steps to reproduce

Start the DAS by asadmin start-domain and see the server log.
Then log records with _ThreadName=main can be found as below, which indicates the service initialization is executed on the main thread instead of RunLevelControllerThread.

$ cat /opt/glassfish-7.0.19/glassfish7/glassfish/domains/domain1/logs/server.log | grep -1 "Running GlassFish Version"
[2024-11-15T21:02:24.922661+09:00] [GF 7.0.19] [INFO] [NCLS-LOGGING-00009] [com.sun.enterprise.server.logging.LogManagerService] [tid: _ThreadID=1 _ThreadName=main] [levelValue: 800] [[
  Running GlassFish Version: Eclipse GlassFish 7.0.19 (commit: 7a897e5df2919f40b5d2ac281c440f80f96d37dc)]]

In GlassFish 7.0.0-M7 or earlier, this was done in RunLevelControllerThread:

$ cat /opt/glassfish-7.0.0-M7/glassfish7/glassfish/domains/domain1/logs/server.log | grep -1 "Running GlassFish Version"
[2024-06-05T18:28:35.983+0900] [glassfish 7.0] [INFO] [NCLS-LOGGING-00009] [jakarta.enterprise.logging] [tid: _ThreadID=26 _ThreadName=RunLevelControllerThread-1717579393004] [timeMillis: 1717579715983] [levelValue: 800] [[
  Running GlassFish Version: Eclipse GlassFish  7.0.0  (build master-b765-ged63b16 2022-07-10T19:56:16+0000)]]

Impact of Issue

Startup may take more time than GlassFish 7.0.0-M7 or earlier.

@dmatej dmatej added this to the 7.0.20 milestone Nov 18, 2024
@dmatej dmatej added the bug Something isn't working label Nov 18, 2024
@dmatej dmatej closed this as completed in 7d27aa7 Nov 18, 2024
@dmatej dmatej added bug Something isn't working and removed bug Something isn't working labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants