camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-2991) Restart CamelContext won't restart services on CxfBeanEndpoint
Date Mon, 26 Jul 2010 06:04:51 GMT

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

Claus Ibsen commented on CAMEL-2991:
------------------------------------

trunk: 979164.

a)
Endpoint is now a Service which means (#2) CxfBeanEndpoint is now also a Service.

b)
TypeConverter now check state that it's started when being used.

> Restart CamelContext won't restart services on CxfBeanEndpoint
> --------------------------------------------------------------
>
>                 Key: CAMEL-2991
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2991
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-cxf
>            Reporter: William Tam
>            Assignee: William Tam
>             Fix For: 2.5.0
>
>         Attachments: CAMEL-2991.patch
>
>
> 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="http://camel.apache.org/schema/spring">
> 		<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.


Mime
View raw message