This is an automated email from the ASF dual-hosted git repository. jamesnetherton 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 f117bdeb41 Reinitialize ActiveMQ IdGenerator at runtime to ensure generated id uniqueness f117bdeb41 is described below commit f117bdeb41e132137c0f1aeea4d1492e2ac5a24a Author: James Netherton <jamesnether...@gmail.com> AuthorDate: Tue May 24 10:21:08 2022 +0100 Reinitialize ActiveMQ IdGenerator at runtime to ensure generated id uniqueness Fixes #3807 --- .../quarkus/component/activemq/deployment/ActiveMQProcessor.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extensions/activemq/deployment/src/main/java/org/apache/camel/quarkus/component/activemq/deployment/ActiveMQProcessor.java b/extensions/activemq/deployment/src/main/java/org/apache/camel/quarkus/component/activemq/deployment/ActiveMQProcessor.java index d90495b7e2..4464b028ff 100644 --- a/extensions/activemq/deployment/src/main/java/org/apache/camel/quarkus/component/activemq/deployment/ActiveMQProcessor.java +++ b/extensions/activemq/deployment/src/main/java/org/apache/camel/quarkus/component/activemq/deployment/ActiveMQProcessor.java @@ -26,6 +26,8 @@ import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem; import io.quarkus.deployment.builditem.FeatureBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; +import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem; +import org.apache.activemq.util.IdGenerator; class ActiveMQProcessor { @@ -88,6 +90,11 @@ class ActiveMQProcessor { nativeImage.produce(new NativeImageResourceBuildItem(servicePaths)); } + @BuildStep + void runtimeReinitializedClasses(BuildProducer<RuntimeReinitializedClassBuildItem> runtimeReInitializedClass) { + runtimeReInitializedClass.produce(new RuntimeReinitializedClassBuildItem(IdGenerator.class.getName())); + } + private String getServiceClass(String servicePath) { try (InputStream resource = ActiveMQProcessor.class.getClassLoader().getResourceAsStream(servicePath)) { Properties properties = new Properties();