diff --git a/examples/quarkus/Readme.md b/examples/quarkus/Readme.md
index 96dd20304..42f0ef32f 100644
--- a/examples/quarkus/Readme.md
+++ b/examples/quarkus/Readme.md
@@ -1,6 +1,16 @@
# Quarkus integration example
+## Build
+
+To build the container image run:
+
+```
+./build-docker.sh
+```
+
+## Run
+
Run with docker:
```
diff --git a/examples/quarkus/build-docker.sh b/examples/quarkus/build-docker.sh
index 0eab1ea6b..93d0d262e 100755
--- a/examples/quarkus/build-docker.sh
+++ b/examples/quarkus/build-docker.sh
@@ -3,7 +3,6 @@ set -euxo pipefail
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
-cp $SCRIPT_DIR/../../wasm/target/wasm-1.0-SNAPSHOT.jar lib/wasm.jar
-cp $SCRIPT_DIR/../../runtime/target/runtime-1.0-SNAPSHOT.jar lib/runtime.jar
+$SCRIPT_DIR/copy-libs.sh
docker build -f $SCRIPT_DIR/src/main/docker/Dockerfile.native-scratch -t andreatp/chicory-demo $SCRIPT_DIR
diff --git a/examples/quarkus/copy-libs.sh b/examples/quarkus/copy-libs.sh
new file mode 100755
index 000000000..aaa1cc7df
--- /dev/null
+++ b/examples/quarkus/copy-libs.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+set -euxo pipefail
+
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+cp $SCRIPT_DIR/../../wasm/target/wasm-1.0-SNAPSHOT.jar lib/wasm.jar
+cp $SCRIPT_DIR/../../runtime/target/runtime-1.0-SNAPSHOT.jar lib/runtime.jar
\ No newline at end of file
diff --git a/examples/quarkus/pom.xml b/examples/quarkus/pom.xml
index 251b4acb4..6e9fb3899 100644
--- a/examples/quarkus/pom.xml
+++ b/examples/quarkus/pom.xml
@@ -3,19 +3,22 @@
4.0.0
org.acme
- getting-started
+ chicory-quarkus-example
1.0.0-SNAPSHOT
- quarkus-bom
- io.quarkus
- 2.4.2.Final
- 3.8.1
- 3.0.0-M5
- UTF-8
- 11
- 11
+ 3.11.0
+ 17
true
+ UTF-8
+ UTF-8
+ quarkus-bom
+ io.quarkus.platform
+ 3.5.0
+ true
+ 3.1.2
+
+ 1.0-SNAPSHOT
@@ -45,17 +48,19 @@
test
- com.dylibso.chickory
+ com.dylibso.chicory
wasm
- 1.0-SNAPSHOT
+ ${chicory.version}
system
+
${basedir}/lib/wasm.jar
- com.dylibso.chickory
+ com.dylibso.chicory
runtime
- 1.0-SNAPSHOT
+ ${chicory.version}
system
+
${basedir}/lib/runtime.jar
@@ -67,9 +72,29 @@
+
+ ${quarkus.platform.group-id}
+ quarkus-maven-plugin
+ ${quarkus.platform.version}
+ true
+
+
+
+ build
+ generate-code
+ generate-code-tests
+
+
+
+
maven-compiler-plugin
${compiler-plugin.version}
+
+
+ -parameters
+
+
maven-surefire-plugin
@@ -82,20 +107,26 @@
- ${quarkus.platform.group-id}
- quarkus-maven-plugin
- ${quarkus.platform.version}
+ maven-failsafe-plugin
+ ${surefire-plugin.version}
- build
+ integration-test
+ verify
+
+
+ ${project.build.directory}/${project.build.finalName}-runner
+ org.jboss.logmanager.LogManager
+ ${maven.home}
+
+
-
native
@@ -105,31 +136,9 @@
+ false
native
-
-
-
- maven-failsafe-plugin
- ${surefire-plugin.version}
-
-
-
- integration-test
- verify
-
-
-
- ${project.build.directory}/${project.build.finalName}-runner
- org.jboss.logmanager.LogManager
- ${maven.home}
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/examples/quarkus/src/main/docker/Dockerfile.jvm b/examples/quarkus/src/main/docker/Dockerfile.jvm
new file mode 100644
index 000000000..8bcc8f2f7
--- /dev/null
+++ b/examples/quarkus/src/main/docker/Dockerfile.jvm
@@ -0,0 +1,97 @@
+####
+# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
+#
+# Before building the container image run:
+#
+# ./mvnw package
+#
+# Then, build the image with:
+#
+# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/code-with-quarkus-jvm .
+#
+# Then run the container using:
+#
+# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-jvm
+#
+# If you want to include the debug port into your docker image
+# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005.
+# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005
+# when running the container
+#
+# Then run the container using :
+#
+# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-jvm
+#
+# This image uses the `run-java.sh` script to run the application.
+# This scripts computes the command line to execute your Java application, and
+# includes memory/GC tuning.
+# You can configure the behavior using the following environment properties:
+# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
+# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
+# in JAVA_OPTS (example: "-Dsome.property=foo")
+# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
+# used to calculate a default maximal heap memory based on a containers restriction.
+# If used in a container without any memory constraints for the container then this
+# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
+# of the container available memory as set here. The default is `50` which means 50%
+# of the available memory is used as an upper boundary. You can skip this mechanism by
+# setting this value to `0` in which case no `-Xmx` option is added.
+# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
+# is used to calculate a default initial heap memory based on the maximum heap memory.
+# If used in a container without any memory constraints for the container then this
+# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
+# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
+# is used as the initial heap size. You can skip this mechanism by setting this value
+# to `0` in which case no `-Xms` option is added (example: "25")
+# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
+# This is used to calculate the maximum value of the initial heap memory. If used in
+# a container without any memory constraints for the container then this option has
+# no effect. If there is a memory constraint then `-Xms` is limited to the value set
+# here. The default is 4096MB which means the calculated value of `-Xms` never will
+# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
+# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
+# when things are happening. This option, if set to true, will set
+# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
+# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
+# true").
+# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
+# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
+# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
+# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
+# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
+# (example: "20")
+# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
+# (example: "40")
+# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
+# (example: "4")
+# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
+# previous GC times. (example: "90")
+# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
+# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
+# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
+# contain the necessary JRE command-line options to specify the required GC, which
+# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
+# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
+# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
+# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
+# accessed directly. (example: "foo.example.com,bar.example.com")
+#
+###
+FROM registry.access.redhat.com/ubi8/openjdk-17:1.17
+
+ENV LANGUAGE='en_US:en'
+
+
+# We make four distinct layers so if there are application changes the library layers can be re-used
+COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/
+COPY --chown=185 target/quarkus-app/*.jar /deployments/
+COPY --chown=185 target/quarkus-app/app/ /deployments/app/
+COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/
+
+EXPOSE 8080
+USER 185
+ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
+ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
+
+ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]
+
diff --git a/examples/quarkus/src/main/docker/Dockerfile.legacy-jar b/examples/quarkus/src/main/docker/Dockerfile.legacy-jar
new file mode 100644
index 000000000..dd8620985
--- /dev/null
+++ b/examples/quarkus/src/main/docker/Dockerfile.legacy-jar
@@ -0,0 +1,93 @@
+####
+# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
+#
+# Before building the container image run:
+#
+# ./mvnw package -Dquarkus.package.type=legacy-jar
+#
+# Then, build the image with:
+#
+# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/code-with-quarkus-legacy-jar .
+#
+# Then run the container using:
+#
+# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-legacy-jar
+#
+# If you want to include the debug port into your docker image
+# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005.
+# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005
+# when running the container
+#
+# Then run the container using :
+#
+# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-legacy-jar
+#
+# This image uses the `run-java.sh` script to run the application.
+# This scripts computes the command line to execute your Java application, and
+# includes memory/GC tuning.
+# You can configure the behavior using the following environment properties:
+# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
+# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
+# in JAVA_OPTS (example: "-Dsome.property=foo")
+# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
+# used to calculate a default maximal heap memory based on a containers restriction.
+# If used in a container without any memory constraints for the container then this
+# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
+# of the container available memory as set here. The default is `50` which means 50%
+# of the available memory is used as an upper boundary. You can skip this mechanism by
+# setting this value to `0` in which case no `-Xmx` option is added.
+# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
+# is used to calculate a default initial heap memory based on the maximum heap memory.
+# If used in a container without any memory constraints for the container then this
+# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
+# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
+# is used as the initial heap size. You can skip this mechanism by setting this value
+# to `0` in which case no `-Xms` option is added (example: "25")
+# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
+# This is used to calculate the maximum value of the initial heap memory. If used in
+# a container without any memory constraints for the container then this option has
+# no effect. If there is a memory constraint then `-Xms` is limited to the value set
+# here. The default is 4096MB which means the calculated value of `-Xms` never will
+# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
+# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
+# when things are happening. This option, if set to true, will set
+# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
+# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
+# true").
+# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
+# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
+# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
+# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
+# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
+# (example: "20")
+# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
+# (example: "40")
+# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
+# (example: "4")
+# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
+# previous GC times. (example: "90")
+# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
+# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
+# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
+# contain the necessary JRE command-line options to specify the required GC, which
+# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
+# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
+# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
+# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
+# accessed directly. (example: "foo.example.com,bar.example.com")
+#
+###
+FROM registry.access.redhat.com/ubi8/openjdk-17:1.17
+
+ENV LANGUAGE='en_US:en'
+
+
+COPY target/lib/* /deployments/lib/
+COPY target/*-runner.jar /deployments/quarkus-run.jar
+
+EXPOSE 8080
+USER 185
+ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
+ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
+
+ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]
diff --git a/examples/quarkus/src/main/docker/Dockerfile.native b/examples/quarkus/src/main/docker/Dockerfile.native
new file mode 100644
index 000000000..7476b1542
--- /dev/null
+++ b/examples/quarkus/src/main/docker/Dockerfile.native
@@ -0,0 +1,27 @@
+####
+# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
+#
+# Before building the container image run:
+#
+# ./mvnw package -Dnative
+#
+# Then, build the image with:
+#
+# docker build -f src/main/docker/Dockerfile.native -t quarkus/code-with-quarkus .
+#
+# Then run the container using:
+#
+# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus
+#
+###
+FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8
+WORKDIR /work/
+RUN chown 1001 /work \
+ && chmod "g+rwX" /work \
+ && chown 1001:root /work
+COPY --chown=1001:root target/*-runner /work/application
+
+EXPOSE 8080
+USER 1001
+
+ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
diff --git a/examples/quarkus/src/main/docker/Dockerfile.native-micro b/examples/quarkus/src/main/docker/Dockerfile.native-micro
new file mode 100644
index 000000000..373286b89
--- /dev/null
+++ b/examples/quarkus/src/main/docker/Dockerfile.native-micro
@@ -0,0 +1,30 @@
+####
+# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
+# It uses a micro base image, tuned for Quarkus native executables.
+# It reduces the size of the resulting container image.
+# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
+#
+# Before building the container image run:
+#
+# ./mvnw package -Dnative
+#
+# Then, build the image with:
+#
+# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/code-with-quarkus .
+#
+# Then run the container using:
+#
+# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus
+#
+###
+FROM quay.io/quarkus/quarkus-micro-image:2.0
+WORKDIR /work/
+RUN chown 1001 /work \
+ && chmod "g+rwX" /work \
+ && chown 1001:root /work
+COPY --chown=1001:root target/*-runner /work/application
+
+EXPOSE 8080
+USER 1001
+
+ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
diff --git a/examples/quarkus/src/main/docker/Dockerfile.native-scratch b/examples/quarkus/src/main/docker/Dockerfile.native-scratch
index 08c0fae88..015f2b5d9 100644
--- a/examples/quarkus/src/main/docker/Dockerfile.native-scratch
+++ b/examples/quarkus/src/main/docker/Dockerfile.native-scratch
@@ -13,10 +13,8 @@
#
# docker run -i --rm -p 8080:8080 quarkus/getting-started
#
-###
-FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.1-java11 AS build
-# FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.1-java17 AS build -> is failing
-# FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:java17 AS build -> is failing
+## Stage 1 : build with maven builder image with native capabilities
+FROM quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:jdk-21 AS build
USER root
RUN microdnf install make gcc
COPY --chown=quarkus:quarkus mvnw /code/mvnw
diff --git a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/ComputeResource.java b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/ComputeResource.java
index 9aff447bf..041eba33e 100644
--- a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/ComputeResource.java
+++ b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/ComputeResource.java
@@ -2,22 +2,31 @@
import io.github.andreatp.wasmdemo.model.Response;
import io.github.andreatp.wasmdemo.model.StringContent;
-import javax.inject.Inject;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import org.jboss.logging.Logger;
@Path("/compute")
public class ComputeResource {
+ private static final Logger LOG = Logger.getLogger(ComputeResource.class);
+
@Inject WasmService service;
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
- public Response load(StringContent content) {
- return new Response(service.compute(content.getContent()));
+ public Response compute(StringContent content) {
+
+ String input = content.getContent();
+ String output = service.compute(input);
+
+ LOG.infof("Compute(%s) -> %s", input, output);
+
+ return new Response(output);
}
}
diff --git a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/WasmResource.java b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/WasmResource.java
index 0f88c2b08..3fa4ba1f3 100644
--- a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/WasmResource.java
+++ b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/WasmResource.java
@@ -1,33 +1,36 @@
package io.github.andreatp.wasmdemo;
import io.github.andreatp.wasmdemo.model.Response;
+
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
-import javax.inject.Inject;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import org.jboss.logging.Logger;
@Path("/wasm")
public class WasmResource {
+ private static final Logger LOG = Logger.getLogger(WasmResource.class);
+
@Inject WasmService service;
@POST
@Consumes(MediaType.APPLICATION_OCTET_STREAM)
@Produces(MediaType.APPLICATION_JSON)
public Response load(InputStream program) throws IOException {
- try (var bais = new ByteArrayInputStream(program.readAllBytes())) {
- if (bais.available() <= 0) {
+ try (program) {
+ if (program.available() <= 0) {
return new Response("NOT IMPORTED LENGTH IS 0");
}
- service.setProgram(bais);
+ service.setProgram(new ByteArrayInputStream(program.readAllBytes()));
+ LOG.info("Program imported.");
return new Response("imported");
- } finally {
- program.close();
}
}
}
diff --git a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/WasmService.java b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/WasmService.java
index ebb9bb565..b78791d4c 100644
--- a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/WasmService.java
+++ b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/WasmService.java
@@ -3,7 +3,7 @@
import com.dylibso.chicory.runtime.Module;
import com.dylibso.chicory.wasm.types.Value;
import java.io.InputStream;
-import javax.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.ApplicationScoped;
@ApplicationScoped
public class WasmService {
@@ -24,10 +24,10 @@ public String compute(String content) {
var countVowels = instance.getExport("count");
var memory = instance.getMemory();
var len = content.getBytes().length;
- var ptr = alloc.apply(Value.i32(len)).asInt();
+ var ptr = alloc.apply(Value.i32(len))[0].asInt();
memory.put(ptr, content);
var result = countVowels.apply(Value.i32(ptr), Value.i32(len));
- return "result: " + result.asInt();
+ return "result: " + result[0].asInt();
}
}
diff --git a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/model/Response.java b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/model/Response.java
index 2c75d130a..266184e30 100644
--- a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/model/Response.java
+++ b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/model/Response.java
@@ -7,10 +7,6 @@ public class Response {
private String message;
- public Response() {
- this.message = null;
- }
-
public Response(String message) {
this.message = message;
}
diff --git a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/model/StringContent.java b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/model/StringContent.java
index b7e270a5c..fad155906 100644
--- a/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/model/StringContent.java
+++ b/examples/quarkus/src/main/java/io/github/andreatp/wasmdemo/model/StringContent.java
@@ -1,5 +1,6 @@
package io.github.andreatp.wasmdemo.model;
+import com.fasterxml.jackson.annotation.JsonCreator;
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
@@ -7,10 +8,7 @@ public class StringContent {
private String content;
- public StringContent() {
- this.content = null;
- }
-
+ @JsonCreator
public StringContent(String content) {
this.content = content;
}
diff --git a/examples/quarkus/src/test/java/io/github/andreatp/wasmdemo/GreetingResourceIT.java b/examples/quarkus/src/test/java/io/github/andreatp/wasmdemo/GreetingResourceIT.java
new file mode 100644
index 000000000..9fa296388
--- /dev/null
+++ b/examples/quarkus/src/test/java/io/github/andreatp/wasmdemo/GreetingResourceIT.java
@@ -0,0 +1,9 @@
+package io.github.andreatp.wasmdemo;
+
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+
+@QuarkusIntegrationTest
+public class GreetingResourceIT extends GreetingResourceTest {
+ // Execute the same tests but in packaged mode.
+}
\ No newline at end of file
diff --git a/examples/quarkus/src/test/java/io/github/andreatp/wasmdemo/NativeGreetingResourceIT.java b/examples/quarkus/src/test/java/io/github/andreatp/wasmdemo/NativeGreetingResourceIT.java
deleted file mode 100644
index 59d54e514..000000000
--- a/examples/quarkus/src/test/java/io/github/andreatp/wasmdemo/NativeGreetingResourceIT.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package io.github.andreatp.wasmdemo;
-
-import io.quarkus.test.junit.NativeImageTest;
-
-@NativeImageTest
-public class NativeGreetingResourceIT extends GreetingResourceTest {
-
- // Execute the same tests but in native mode.
-}