JiriOndrusek commented on code in PR #3793:
URL: https://github.com/apache/camel-quarkus/pull/3793#discussion_r876661913
##########
integration-tests/velocity/src/main/resources/application.properties:
##########
@@ -15,4 +15,6 @@
## limitations under the License.
## ---------------------------------------------------------------------------
-quarkus.native.resources.includes = template/*
\ No newline at end of file
+quarkus.native.resources.includes = template/*
+
+quarkus.camel.native.reflection.include-patterns=org.apache.camel.Exchange
Review Comment:
As you mentioned it, I agree that this should work automatically without
registration. (At least from the PoV of user this is internal stuff)
Without registration of the Exchange, the execution fails in native mode,
because I'm using exchange as an object in template (see `Dear ${headers.name}.
You ordered item ${exchange.properties.item} on ${body}`).
```
VelocityTest.testVelocityContext:157 expected: <
Dear Sheldon. You ordered item Earth 1 on Monday.> but was: <
Dear Sheldon. You ordered item ${exchange.properties.item} on Monday.>
```
I was looking for an automatic registration for reflections of internal
classes, but I was able to find only classes for serialization -
https://github.com/apache/camel-quarkus/blob/main/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java#L86
I'd say that the similar mechanism would make sense also for registration
for reflection and that the `org.apache.camel.Exchange` should be there. What
do you think @jamesnetherton , @zhfeng ?
(I can create separate ticket and work on it)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]