camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tadayoshi Sato (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CAMEL-10964) CXF http-jetty transport reverse proxy configuration will not work when using @BeanInject in RouteBuilder bean
Date Wed, 08 Mar 2017 12:39:38 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-10964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tadayoshi Sato reassigned CAMEL-10964:
--------------------------------------

    Assignee: Tadayoshi Sato  (was: Grzegorz Grzybek)

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

Mime
View raw message