You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by gterral <gu...@gmail.com> on 2015/06/25 11:53:39 UTC

Unable to shutdown endpoint when intercepted with interceptSendToEndpoint

Hello,

I'm facing an issue with the version of camel 2.15.2

I have a component that create an endpoint.

This endpoint override the shutdown and doShutdown method so we can log
values at shutdown time.

But when this endpoint is intercept with the interceptSendToEnpoint method
the shutdown is not called.

Here is an example of code to reproduce:

the Component:


the Endpoint:


the route:


When there is an interceptor the shutdown on the endpoint is not called,
when there is no interceptor the shutdown is called.

After some debugging I noticed that in the DefaultCamelContext at the
shutdown time the shutdown is called on the list of endpoints, when there is
an interceptor the list do not contain the CustomEnpoint but only the
Interceptor, and because the interceptor does not implement
ShutdownableAware the shutdown is not propagate to the underlying endpoint
(here the CustomEndpoint)

Without the interceptor the CustomEndpoint appears in the list and the
shutdown method is called.

Is this expected or not ? 

If it's not should I create an issue on your Jira ?

Thanks in advance,

Guillaume




--
View this message in context: http://camel.465427.n5.nabble.com/Unable-to-shutdown-endpoint-when-intercepted-with-interceptSendToEndpoint-tp5768574.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Unable to shutdown endpoint when intercepted with interceptSendToEndpoint

Posted by gterral <gu...@gmail.com>.
Ticket logged under: 

https://issues.apache.org/jira/browse/CAMEL-8914

Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Unable-to-shutdown-endpoint-when-intercepted-with-interceptSendToEndpoint-tp5768574p5768646.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Unable to shutdown endpoint when intercepted with interceptSendToEndpoint

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah seems like a little bug, you are welcome to log a ticket

On Thu, Jun 25, 2015 at 11:53 AM, gterral <gu...@gmail.com> wrote:
> Hello,
>
> I'm facing an issue with the version of camel 2.15.2
>
> I have a component that create an endpoint.
>
> This endpoint override the shutdown and doShutdown method so we can log
> values at shutdown time.
>
> But when this endpoint is intercept with the interceptSendToEnpoint method
> the shutdown is not called.
>
> Here is an example of code to reproduce:
>
> the Component:
>
>
> the Endpoint:
>
>
> the route:
>
>
> When there is an interceptor the shutdown on the endpoint is not called,
> when there is no interceptor the shutdown is called.
>
> After some debugging I noticed that in the DefaultCamelContext at the
> shutdown time the shutdown is called on the list of endpoints, when there is
> an interceptor the list do not contain the CustomEnpoint but only the
> Interceptor, and because the interceptor does not implement
> ShutdownableAware the shutdown is not propagate to the underlying endpoint
> (here the CustomEndpoint)
>
> Without the interceptor the CustomEndpoint appears in the list and the
> shutdown method is called.
>
> Is this expected or not ?
>
> If it's not should I create an issue on your Jira ?
>
> Thanks in advance,
>
> Guillaume
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Unable-to-shutdown-endpoint-when-intercepted-with-interceptSendToEndpoint-tp5768574.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/