[
https://issues.apache.org/jira/browse/CAMEL-10964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15903189#comment-15903189
]
ASF GitHub Bot commented on CAMEL-10964:
----------------------------------------
Github user asfgit closed the pull request at:
https://github.com/apache/camel/pull/1517
> CXF http-jetty transport reverse proxy configuration will not work when using
> @BeanInject in RouteBuilder bean
> --------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-10964
> URL: https://issues.apache.org/jira/browse/CAMEL-10964
> Project: Camel
> Issue Type: Bug
> Components: camel-blueprint, camel-cxf
> Affects Versions: 2.18.2
> Reporter: Tadayoshi Sato
> Assignee: Tadayoshi Sato
> Fix For: 2.19.0
>
>
> Inside a {{RouteBuilder}} another bean is injected from registry using
> {{@BeanInject}}:
> {code:java}
> public class GreeterBuilder extends RouteBuilder {
> @BeanInject
> Configuration configuration;
> @Override
> public void configure() throws Exception {
> from("cxf:bean:routerEndpoint")
> ...
> }
> ...
> {code}
> CXF http-jetty transport is configured with reverse proxy inside blueprint
> context like this:
> {code}
> <blueprint ...>
> <httpj:engine-factory bus="cxf">
> <httpj:engine port="7771">
> <httpj:connector>
> <bean id="connector" class="org.eclipse.jetty.server.ServerConnector">
> <argument ref="server" />
> <argument>
> <array>
> <ref component-id="httpConnectionFactory" />
> </array>
> </argument>
> <property name="port" value="7771" />
> </bean>
> </httpj:connector>
> </httpj:engine>
> </httpj:engine-factory>
> <bean id="server" class="org.eclipse.jetty.server.Server" />
> <bean id="httpConfiguration"
> class="org.eclipse.jetty.server.HttpConfiguration">
> <property name="customizers">
> <list>
> <bean class="org.eclipse.jetty.server.ForwardedRequestCustomizer" />
> </list>
> </property>
> </bean>
> <bean id="httpConnectionFactory"
> class="org.eclipse.jetty.server.HttpConnectionFactory">
> <argument ref="httpConfiguration" />
> </bean>
> ...
> {code}
> However, the reverse proxy won't work as long as {{@BeanInject}} is present
> in the {{RouteBuilder}} bean.
> The root cause is that the {{camel-blueprint}}'s {{CamelInjector}} triggers
> earlier startup of the blueprint Camel context before the route is fully up,
> so the http-jetty transport configuration is not correctly connected to the
> CXF endpoint.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)