Skip to content

Commit

Permalink
feat(connector-corda): support JVM 17 Cordapps
Browse files Browse the repository at this point in the history
1. The runner stage of the corda connector JVM image now uses an up to
date JRE instead of the very old JDK 8 which the builder stage is still
stuck on.
2. This enables the connector to load and use contract .jar files which
were built with the newer JDK as well.
3. This is important because we would like to support as wide range of
contract/flow invocation use cases as possible and also recently there's
been some changes in the Corda official samples repositories where the
contracts are being upgraded to JVM 17 as well so this will become more
and more relevant as a use-case in the near future.

Signed-off-by: Peter Somogyvari <[email protected]>
  • Loading branch information
petermetz committed Jul 9, 2024
1 parent c284040 commit 1994128
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ jobs:
run: yarn run benchmark

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1.19.2
uses: benchmark-action/github-action-benchmark@v1.20.3
with:
tool: 'benchmarkjs'
output-file-path: .tmp/benchmark-results/cmd-api-server/run-cmd-api-server-benchmark.ts.log
Expand All @@ -508,10 +508,10 @@ jobs:
auto-push: ${{ github.ref == 'refs/heads/main' }}

# Show alert with commit comment on detecting possible performance regression
alert-threshold: '25%'
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@petermetz'
alert-comment-cc-users: '@hyperledger/cacti-maintainers'

cactus-cmd-socketio-server:
continue-on-error: false
Expand Down Expand Up @@ -1102,7 +1102,7 @@ jobs:
run: yarn run benchmark

- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1.19.2
uses: benchmark-action/github-action-benchmark@v1.20.3
with:
tool: 'benchmarkjs'
output-file-path: .tmp/benchmark-results/plugin-ledger-connector-besu/run-plugin-ledger-connector-besu-benchmark.ts.log
Expand All @@ -1113,10 +1113,10 @@ jobs:
auto-push: ${{ github.ref == 'refs/heads/main' }}

# Show alert with commit comment on detecting possible performance regression
alert-threshold: '5%'
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@petermetz'
alert-comment-cc-users: '@hyperledger/cacti-maintainers'

cpl-connector-polkadot:
continue-on-error: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /kotlin-spring/
RUN gradle build
WORKDIR /

FROM openjdk:8u275-jre-slim-buster
FROM openjdk:24-slim-bookworm

ARG APP=/usr/src/app
ENV APP=/usr/src/app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

# Without these we get crashes on JDK 17 an above since the introduction of the
# Java Modules system.
EXTRA_JVM_ARGS=""

EXTRA_JVM_ARGS="--add-exports java.base/sun.security.provider.certpath=ALL-UNNAMED"
EXTRA_JVM_ARGS="--add-exports java.base/sun.security.util=ALL-UNNAMED ${EXTRA_JVM_ARGS}"
EXTRA_JVM_ARGS="--add-exports java.base/sun.security.rsa=ALL-UNNAMED ${EXTRA_JVM_ARGS}"
EXTRA_JVM_ARGS="--add-exports jdk.crypto.ec/sun.security.ec=ALL-UNNAMED ${EXTRA_JVM_ARGS}"
EXTRA_JVM_ARGS="--add-exports java.base/sun.security.x509=ALL-UNNAMED ${EXTRA_JVM_ARGS}"
EXTRA_JVM_ARGS="--add-opens java.base/java.util=ALL-UNNAMED ${EXTRA_JVM_ARGS}"
EXTRA_JVM_ARGS="--add-opens java.base/java.time=ALL-UNNAMED ${EXTRA_JVM_ARGS}"
EXTRA_JVM_ARGS="--add-opens java.base/java.io=ALL-UNNAMED ${EXTRA_JVM_ARGS}"

for i in 1 2 3; do java $EXTRA_JVM_ARGS -jar ${APP}/kotlin-spring/build/libs/cactus-connector-corda-server-2.0.0-rc.2.jar && break || sleep 5; done

0 comments on commit 1994128

Please sign in to comment.