camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Tam (JIRA)" <>
Subject [jira] Updated: (CAMEL-2991) Restart CamelContext won't restart services on CxfBeanEndpoint
Date Sun, 25 Jul 2010 03:29:51 GMT


William Tam updated CAMEL-2991:

    Attachment:     (was: CAMEL-2991.patch)

> Restart CamelContext won't restart services on CxfBeanEndpoint
> --------------------------------------------------------------
>                 Key: CAMEL-2991
>                 URL:
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-cxf
>            Reporter: William Tam
>             Fix For: 2.5.0
> A route that sends to a CxfBean destination is unusable after the CamelContext has been
stopped and re-started.  The following is an example of a route that demonstrates the problem.
> {code}
> 	<camelContext id="camel" xmlns="">
> 		<route>
> 			<from uri="jetty:http://localhost:9000?matchOnUriPrefix=true" />
> 			<to uri="cxfbean:customerServiceBean" />
> 		</route>
> 	</camelContext>
> 	<util:list id="customerServiceBean">
> 		<bean class="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService" />
> 	</util:list>
> {code}
> The follow issues have been identified.
> 1) SendProcessor should implement the Navigate interface so that its children (if they
are Services) can be managed by the lifecycle methods.  This will address any destination
endpoint that requires services to be re-started.
> 2) CxfBeanEndpoint should be a Service itself.  The reason why the start() on CxfBeanEndpoint
gets called during the first start is because CxfBeanComponent.start() gets invoked during
route definition initialization.   The problem is that re-starting doesn't trigger the CxfBeanComponent.start()
method.  Therefore, putting the hook in CxfBeanComponent to start/stop CxfBeanEndpoint was
a bug.
> 3) The default type converter which is a Service won't get "re-started' as the (lazy-instantiation)
getTypeConverter() method won't perform addService() on a created but "stopped' typeConverter.
 We need to discuss the correct remedy since I am not sure how to fix it.  It is kind of strange
that the type converter is a service (which has the start/stop semantics) and yet it can be
used even the CamelContext is stopped (or never started).  In the patch, I just set the type
converter to null in DefaultCamelContext doStop() for now.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message