You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zh...@apache.org on 2022/04/06 01:04:42 UTC

[camel-quarkus] branch main updated: camel-quarkus-paho: Add reflection config for RandomAccessFile (#3691)

This is an automated email from the ASF dual-hosted git repository.

zhfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new 84ee17795f camel-quarkus-paho: Add reflection config for RandomAccessFile (#3691)
84ee17795f is described below

commit 84ee17795fdb46a6b4c0f5890e9ae3ee30fbfe2a
Author: Amos Feng <zh...@gmail.com>
AuthorDate: Wed Apr 6 09:04:38 2022 +0800

    camel-quarkus-paho: Add reflection config for RandomAccessFile (#3691)
---
 .../apache/camel/quarkus/component/paho/deployment/PahoProcessor.java | 2 ++
 .../java/org/apache/camel/quarkus/component/paho/PahoResource.java    | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/extensions/paho/deployment/src/main/java/org/apache/camel/quarkus/component/paho/deployment/PahoProcessor.java b/extensions/paho/deployment/src/main/java/org/apache/camel/quarkus/component/paho/deployment/PahoProcessor.java
index 5858d6608f..4a71c2df67 100644
--- a/extensions/paho/deployment/src/main/java/org/apache/camel/quarkus/component/paho/deployment/PahoProcessor.java
+++ b/extensions/paho/deployment/src/main/java/org/apache/camel/quarkus/component/paho/deployment/PahoProcessor.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.quarkus.component.paho.deployment;
 
+import java.io.RandomAccessFile;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
 import java.util.ResourceBundle;
@@ -45,6 +46,7 @@ class PahoProcessor {
         p.produce(new ReflectiveClassBuildItem(false, false, ResourceBundle.class));
         p.produce(new ReflectiveClassBuildItem(false, false, FileLock.class));
         p.produce(new ReflectiveClassBuildItem(true, false, FileChannel.class));
+        p.produce(new ReflectiveClassBuildItem(true, false, RandomAccessFile.class));
         p.produce(new ReflectiveClassBuildItem(true, false, "sun.nio.ch.FileLockImpl"));
     }
 
diff --git a/integration-tests/paho/src/main/java/org/apache/camel/quarkus/component/paho/PahoResource.java b/integration-tests/paho/src/main/java/org/apache/camel/quarkus/component/paho/PahoResource.java
index e5e84099d0..68282cb497 100644
--- a/integration-tests/paho/src/main/java/org/apache/camel/quarkus/component/paho/PahoResource.java
+++ b/integration-tests/paho/src/main/java/org/apache/camel/quarkus/component/paho/PahoResource.java
@@ -92,7 +92,7 @@ public class PahoResource {
     @GET
     @Produces(MediaType.TEXT_PLAIN)
     public String readThenWriteWithFilePersistenceShouldSucceed(@QueryParam("message") String message) throws Exception {
-        producerTemplate.requestBody("paho:withFilePersistence?retained=true&cleanSession=false&persistence=FILE", message);
-        return consumerTemplate.receiveBody("paho:withFilePersistence?cleanSession=false&persistence=FILE", 5000, String.class);
+        producerTemplate.requestBody("paho:withFilePersistence?retained=true&persistence=FILE", message);
+        return consumerTemplate.receiveBody("paho:withFilePersistence?persistence=FILE", 5000, String.class);
     }
 }