You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2020/10/22 11:13:54 UTC
[camel-quarkus] branch master updated: ActiveMQ Default XPath
evaluator could not be loaded
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push:
new 1d78ae7 ActiveMQ Default XPath evaluator could not be loaded
1d78ae7 is described below
commit 1d78ae768b957ed6e17e9817d4cd9b1ff796552a
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Oct 22 07:33:27 2020 +0100
ActiveMQ Default XPath evaluator could not be loaded
Fixes #1933
---
.../ROOT/pages/reference/extensions/activemq.adoc | 6 +++
.../activemq/runtime/src/main/doc/limitations.adoc | 2 +
.../activemq/graal/ActiveMQSubstitutions.java | 43 ++++++++++++++++++++++
3 files changed, 51 insertions(+)
diff --git a/docs/modules/ROOT/pages/reference/extensions/activemq.adoc b/docs/modules/ROOT/pages/reference/extensions/activemq.adoc
index 16ea981..baf63c0 100644
--- a/docs/modules/ROOT/pages/reference/extensions/activemq.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/activemq.adoc
@@ -33,6 +33,12 @@ Please refer to the above link for usage and configuration details.
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+== Camel Quarkus limitations
+
+ActiveMQ https://activemq.apache.org/selectors.html[XPath selectors] are disabled in native mode as the functionality depends on `activemq-broker`. This dependency
+is excluded from the dependency tree, since none of the ActiveMQ broker functionality is supported in native mode.
+
+
== SSL in native mode
This extension auto-enables SSL support in native mode. Hence you do not need to add
diff --git a/extensions/activemq/runtime/src/main/doc/limitations.adoc b/extensions/activemq/runtime/src/main/doc/limitations.adoc
new file mode 100644
index 0000000..1a8b4f7
--- /dev/null
+++ b/extensions/activemq/runtime/src/main/doc/limitations.adoc
@@ -0,0 +1,2 @@
+ActiveMQ https://activemq.apache.org/selectors.html[XPath selectors] are disabled in native mode as the functionality depends on `activemq-broker`. This dependency
+is excluded from the dependency tree, since none of the ActiveMQ broker functionality is supported in native mode.
diff --git a/extensions/activemq/runtime/src/main/java/org/apache/camel/quarkus/component/activemq/graal/ActiveMQSubstitutions.java b/extensions/activemq/runtime/src/main/java/org/apache/camel/quarkus/component/activemq/graal/ActiveMQSubstitutions.java
new file mode 100644
index 0000000..b9fd5fc
--- /dev/null
+++ b/extensions/activemq/runtime/src/main/java/org/apache/camel/quarkus/component/activemq/graal/ActiveMQSubstitutions.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.activemq.graal;
+
+import com.oracle.svm.core.annotate.Delete;
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import org.apache.activemq.filter.BooleanExpression;
+import org.apache.activemq.filter.UnaryExpression;
+import org.apache.activemq.filter.XPathExpression;
+
+final class ActiveMQSubstitutions {
+}
+
+@TargetClass(XPathExpression.class)
+@Delete
+final class SubstituteXPathExpression {
+}
+
+@TargetClass(UnaryExpression.class)
+final class SubstituteUnaryExpression {
+
+ @Substitute
+ public static BooleanExpression createXPath(final String xpath) {
+ // The required dependencies to make this work are not on the classpath by default
+ // Since this appears to be a somewhat niche feature for Camel, it is not supported in native mode
+ throw new RuntimeException("XPath selectors are not supported in native mode");
+ }
+}