You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/06/03 11:38:49 UTC
[GitHub] [camel-quarkus] lburgazzoli opened a new issue #1303: Configuring api context path with property `camel.context.rest-configuration.api-context-path` does not work
lburgazzoli opened a new issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303
While working on the openapi-java extension (#1281) I found a strange behaviour, so assuming we have:
```
camel.context.rest-configuration.component = undertow
camel.context.rest-configuration.api-context-path=/openapi.json
```
Then the api context path is null on the rest configuration when running in native mode but works in jvm mode. Using main short-cuts like:
```
camel.rest.component = undertow
camel.rest.api-context-path=/openapi.json
```
works in both the modes.
We should definitively use the `camel.rest` prefix to configure the rest bits but `camel.context.rest-configuration` is also supposed to work so it should there should not be differences.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-650502168
The style to configure rest is
```
camel.rest.*
```
And not
```
camel.context.rest-configuration.*
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] lburgazzoli commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-651012423
So IMHO we should remove the option to use `camel.context.xxx`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus commented on issue #1303: [Camel 3.5] Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-689400110
Not needed as its tested in camel-core - and this is a issue in camel-core and not camel-quarkus
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-651011807
Its really only the options listed on that page that are reflection free configurable and intended for configuration via properties.
When you do `camel.context.xxx` you go of the track, and you can end up calling any APIs down the context, and its children etc. We will never be able to source code generate for every possible combination here.
The stream caching configuration is already on camel.main as configurable
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-650510879
btw you can see all the options you can set as properties here
https://camel.apache.org/components/latest/others/main.html
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-651055920
Yes fair point, and to make camel.context.rest-configuration.xxx work in native mode is fixed by CAMEL-15247 and thus Camel 3.5 onwards.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus closed issue #1303: [Camel 3.5] Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus closed issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-651014114
First level camel.context.xxx is possible as there is a configurer for that.
its when you do
camel.context.xxx.yyy.zzz
Where it depends what yyy.zzz are etc.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-650502401
But we can look at a way to have a configurer generated for RestConfiguration as well.
https://github.com/apache/camel/blob/39cbd7f6866cb041d77f6fddc3c7c0721e4d0926/core/camel-core-engine/pom.xml#L135
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] lburgazzoli commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-651004223
I think that either we remove the option to set camel context specific bits via the `camel.context` prefix or we have to fix it as it is true that we have `main.rest` for the rest bits but the mechanic of the issue that James described could apply as example to the stream caching configuration
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] jamesnetherton commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-650221507
TL;DR - `FastCamelContext` needs to be registered for reflection for the `camel.context.rest-configuration.*` config style to work in native mode.
It comes down to how `PropertyBindingSupport` resolves the target object to bind the property value. When using the short cut, the property name seen by `PropertyBindingSupport.setProperty` is stripped of the `camel.rest` prefix. E.g like `apiContextPath`.
With the longer style, the property name is like `restConfiguration.apiContextPath`. This results in iterating over the '.' delimited parts in order to resolve each property. `RestConfiguration` belongs to `FastCamelContext`, and hence it gets looked up reflectively (there is no property configurer for `RestConfiguration`).
Currently this part fails, so a new `RestConfiguration` is instantiated for each rest configuration property that the user has chosen to set, effectively erasing any `rest-configuration` properties that were previously set.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-651012911
Quarkus is not the only one in the universe, and surely also not native mode. Camel Main is also used by camel kafka connector etc.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] davsclaus commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
davsclaus commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-650510731
I create a ticket in Camel
https://issues.apache.org/jira/browse/CAMEL-15247
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] ppalaga commented on issue #1303: [Camel 3.5] Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-689396758
@jamesnetherton says that this is fixed in Camel and that in Camel Quarkus master the issue does not occur. We might still want to add a tests.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] lburgazzoli commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-651015952
My only point is that if `camel.context.xxx.yyy.zzz` is allowed, then it has to work. If it is reflectively done or with a configurer, I don't mind and it is really not the point of my issue
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] lburgazzoli commented on issue #1303: Configuring api context path with property camel.context.rest-configuration.api-context-path does not work
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1303:
URL: https://github.com/apache/camel-quarkus/issues/1303#issuecomment-650297557
I thought that the RestConfiguration was instantiated only once after the first property set.
Btw since we have now a single configuration for rest we could avoid the getter/setter and simply create the rest configuration the first time the getter is invoked
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org