[ 
https://issues.apache.org/jira/browse/CAMEL-10964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15901192#comment-15901192
 ] 

Tadayoshi Sato commented on CAMEL-10964:
----------------------------------------

Actually I confirmed that this issue is already fixed by CAMEL-10513, but I'd 
like to write an itest for the issue so that it won't regress in the future.

> 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
>
> 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)

Reply via email to