From a94c8847a91406064a81f0bb5fd392ad83eb457b Mon Sep 17 00:00:00 2001 From: Takahiro Nagao Date: Mon, 18 Nov 2024 17:13:14 +0900 Subject: [PATCH] Restore the system property GlassFish_Platform configuration This avoids the threading policy from being set to USE_NO_THREADS in AppServerStartup#postConstruct() Signed-off-by: Takahiro Nagao --- .../sun/enterprise/glassfish/bootstrap/GlassFishMain.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMain.java b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMain.java index 1f9f2d5d1c5..0ea5ef8835b 100644 --- a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMain.java +++ b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMain.java @@ -77,9 +77,13 @@ public static void main(final String[] args) { checkJdkVersion(); final Properties argsAsProps = argsToMap(args); - final OsgiPlatform platform = OsgiPlatform.valueOf(whichPlatform()); + final String platformName = whichPlatform(); + final OsgiPlatform platform = OsgiPlatform.valueOf(platformName); STDOUT.println("Launching GlassFish on " + platform + " platform"); + // Set the system property to allow downstream code to know the platform on which GlassFish runs. + System.setProperty(PLATFORM_PROPERTY_KEY, platformName); + final Path instanceRoot = findInstanceRoot(installRoot, argsAsProps); final ServerFiles files = new ServerFiles(installRoot.toPath(), instanceRoot); final StartupContextCfg startupContextCfg = createStartupContextCfg(platform, files, args);