From 7b0b9a77de4b12fdd12dabfac569f10087b3c424 Mon Sep 17 00:00:00 2001 From: Tim Middleton Date: Fri, 4 Oct 2024 15:11:54 +0800 Subject: [PATCH 1/2] remove JDK 22 --- .github/workflows/maven-build-snapshots.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/maven-build-snapshots.yml b/.github/workflows/maven-build-snapshots.yml index 798d806..698a234 100644 --- a/.github/workflows/maven-build-snapshots.yml +++ b/.github/workflows/maven-build-snapshots.yml @@ -21,7 +21,6 @@ jobs: - 24.09 javaVersion: - 21 - - 22 steps: - uses: actions/checkout@v4 From 966843bdb7ea22889bc89a0974aa91ccbb49ec41 Mon Sep 17 00:00:00 2001 From: Tim Middleton Date: Wed, 9 Oct 2024 13:53:12 +0800 Subject: [PATCH 2/2] Minor updates --- .../demo/application/StartSecondaryResource.java | 8 ++++++++ src/main/resources/web/index.html | 6 +++--- src/main/resources/web/javascripts/controllers.js | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/oracle/coherence/demo/application/StartSecondaryResource.java b/src/main/java/com/oracle/coherence/demo/application/StartSecondaryResource.java index 97462e2..33aff89 100644 --- a/src/main/java/com/oracle/coherence/demo/application/StartSecondaryResource.java +++ b/src/main/java/com/oracle/coherence/demo/application/StartSecondaryResource.java @@ -34,6 +34,7 @@ import com.oracle.bedrock.runtime.console.NullApplicationConsole; import com.oracle.bedrock.runtime.console.SystemApplicationConsole; +import com.oracle.bedrock.runtime.java.options.JvmOptions; import com.oracle.bedrock.runtime.java.options.SystemProperty; import com.oracle.bedrock.runtime.options.Console; @@ -50,6 +51,9 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.UriInfo; +import java.lang.management.ManagementFactory; +import java.util.List; + import static com.oracle.bedrock.deferred.DeferredHelper.eventually; import static com.oracle.bedrock.deferred.DeferredHelper.invoking; import static com.oracle.bedrock.predicate.Predicates.greaterThan; @@ -89,6 +93,9 @@ public Response startCluster() { ApplicationConsole console = System.getProperty("secondary.verbose") == null ? new NullApplicationConsole() : new SystemApplicationConsole(); + List inputArguments = ManagementFactory.getRuntimeMXBean().getInputArguments(); + List newArguments = inputArguments.stream().filter(s->s.contains("-Xm")).toList(); + try { // start the new cache server CoherenceCacheServer server = @@ -120,6 +127,7 @@ public Response startCluster() { ClusterPort.of(Launcher.SECONDARY_PORT), ClusterName.of(secondaryName), SystemProperty.of("with.data", "false"), + JvmOptions.include(newArguments.toArray(new String[0])), SystemProperty.of(Launcher.PRIMARY_CLUSTER_PROPERTY, System.getProperty(Launcher.PRIMARY_CLUSTER_PROPERTY)), SystemProperty.of(Launcher.SECONDARY_CLUSTER_PROPERTY, diff --git a/src/main/resources/web/index.html b/src/main/resources/web/index.html index 0404574..aaa3f49 100644 --- a/src/main/resources/web/index.html +++ b/src/main/resources/web/index.html @@ -254,10 +254,10 @@