ppalaga commented on a change in pull request #1902:
URL: https://github.com/apache/camel-quarkus/pull/1902#discussion_r503757806
##########
File path:
extensions/leveldb/deployment/src/main/java/org/apache/camel/quarkus/component/leveldb/deployment/LeveldbProcessor.java
##########
@@ -16,31 +16,41 @@
*/
package org.apache.camel.quarkus.component.leveldb.deployment;
+import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.annotations.ExecutionTime;
-import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.FeatureBuildItem;
-import io.quarkus.deployment.pkg.steps.NativeBuild;
-import org.apache.camel.quarkus.core.JvmOnlyRecorder;
-import org.jboss.logging.Logger;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
+import org.apache.camel.support.DefaultExchangeHolder;
class LeveldbProcessor {
- private static final Logger LOG = Logger.getLogger(LeveldbProcessor.class);
private static final String FEATURE = "camel-leveldb";
@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}
- /**
- * Remove this once this extension starts supporting the native mode.
- */
- @BuildStep(onlyIf = NativeBuild.class)
- @Record(value = ExecutionTime.RUNTIME_INIT)
- void warnJvmInNative(JvmOnlyRecorder recorder) {
- JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
- recorder.warnJvmInNative(FEATURE); // warn at runtime
+ @BuildStep
+ ReflectiveClassBuildItem registerForReflection() {
+ return new ReflectiveClassBuildItem(false, false, new String[] {
+ org.iq80.leveldb.impl.Iq80DBFactory.class.getName(),
+ org.apache.camel.support.DefaultExchangeHolder.class.getName()
+ });
+ }
+
+ @BuildStep
+ ReflectiveClassBuildItem registerForReflectionWithFields() {
+ return new ReflectiveClassBuildItem(false, true, new String[] {
+ DefaultExchangeHolder.class.getName(),
Review comment:
Yes, and that's exactly what I do not understand: Why/where does
DefaultExchangeHolder need to be serialized?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]