Skip to content

Commit

Permalink
camel-quarkus-paho: Add reflection config for RandomAccessFile (#3691) (
Browse files Browse the repository at this point in the history
  • Loading branch information
zhfeng committed Apr 6, 2022
1 parent 3cdbc79 commit b6b5ee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -45,6 +46,7 @@ void registerReflectiveClasses(BuildProducer<ReflectiveClassBuildItem> p) {
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"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public String mqttExceptionDuringReconnectShouldSucceed() {
@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);
}
}

0 comments on commit b6b5ee9

Please sign in to comment.