You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Marco Zapletal (Created) (JIRA)" <ji...@apache.org> on 2012/03/07 18:18:58 UTC
[jira] [Created] (CAMEL-5065) Populating Exchange.FAILURE_ENDPOINT
when bean is referenced using bean(...) and throws Exception
Populating Exchange.FAILURE_ENDPOINT when bean is referenced using bean(...) and throws Exception
-------------------------------------------------------------------------------------------------
Key: CAMEL-5065
URL: https://issues.apache.org/jira/browse/CAMEL-5065
Project: Camel
Issue Type: Improvement
Components: camel-core
Affects Versions: 2.9.1
Reporter: Marco Zapletal
Priority: Minor
We are currently working on the management of failed exchanged. For getting an insight what has happened the Exchange.FAILURE_ENDPOINT delivers valuable information. However, this property gets only populated by endpoints. This means, when using beans, the property is set when the bean is referenced using to(bean://exceptionBean), but not if the bean is referenced using bean(exceptionBean). In the latter case, the property gets either populated using the last endpoint before the bean(...) or not at all. Please see the attached test case.
Thus, I would like to suggest populating the Exchange.FAILURE_ENDPOINT also for beans that are referenced in the DSL using the .bean() notation
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-5065) Populating Exchange.FAILURE_ENDPOINT
when bean is referenced using bean(...) and throws Exception
Posted by "Marco Zapletal (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Zapletal updated CAMEL-5065:
----------------------------------
Attachment: populatingFailureEndpointProperty.zip
> Populating Exchange.FAILURE_ENDPOINT when bean is referenced using bean(...) and throws Exception
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5065
> URL: https://issues.apache.org/jira/browse/CAMEL-5065
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.9.1
> Reporter: Marco Zapletal
> Priority: Minor
> Attachments: populatingFailureEndpointProperty.zip
>
>
> We are currently working on the management of failed exchanged. For getting an insight what has happened the Exchange.FAILURE_ENDPOINT delivers valuable information. However, this property gets only populated by endpoints. This means, when using beans, the property is set when the bean is referenced using to(bean://exceptionBean), but not if the bean is referenced using bean(exceptionBean). In the latter case, the property gets either populated using the last endpoint before the bean(...) or not at all. Please see the attached test case.
> Thus, I would like to suggest populating the Exchange.FAILURE_ENDPOINT also for beans that are referenced in the DSL using the .bean() notation
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5065) Populating
Exchange.FAILURE_ENDPOINT when bean is referenced using bean(...) and
throws Exception
Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224795#comment-13224795 ]
Claus Ibsen commented on CAMEL-5065:
------------------------------------
I will be -1 this idea, as the property is for *endpoints*.
So its when you send a message to another endpoint.
We should not mix in other situations where its being set.
You can build you own interceptor to track what is going on, as well tap into the tracer which have details where the message has been routed.
> Populating Exchange.FAILURE_ENDPOINT when bean is referenced using bean(...) and throws Exception
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5065
> URL: https://issues.apache.org/jira/browse/CAMEL-5065
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.9.1
> Reporter: Marco Zapletal
> Priority: Minor
> Fix For: 2.10.0
>
> Attachments: populatingFailureEndpointProperty.zip
>
>
> We are currently working on the management of failed exchanged. For getting an insight what has happened the Exchange.FAILURE_ENDPOINT delivers valuable information. However, this property gets only populated by endpoints. This means, when using beans, the property is set when the bean is referenced using to(bean://exceptionBean), but not if the bean is referenced using bean(exceptionBean). In the latter case, the property gets either populated using the last endpoint before the bean(...) or not at all. Please see the attached test case.
> Thus, I would like to suggest populating the Exchange.FAILURE_ENDPOINT also for beans that are referenced in the DSL using the .bean() notation
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5065) Populating
Exchange.FAILURE_ENDPOINT when bean is referenced using bean(...) and
throws Exception
Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225106#comment-13225106 ]
Claus Ibsen commented on CAMEL-5065:
------------------------------------
When using bean you can hand in an existing instance, which Camel cannot safely invoke from an endpoint, as it may not be enlisted in a registry, so the bean cannot be looked up. Neither the bean may not have a default no-args ctr, that Camel can use to instantiate the bean, etc. Its going down a wrong path.
Likewise what about other EIPs such as transform, split, etc. Should the FAILURE_ENDPOINT also have some details here?
What you are looking for is the message history, where you have the node id, of the route where the last failure occurred. That id, may point to a <bean> a <to> etc. The tracer got this detail.
> Populating Exchange.FAILURE_ENDPOINT when bean is referenced using bean(...) and throws Exception
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5065
> URL: https://issues.apache.org/jira/browse/CAMEL-5065
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.9.1
> Reporter: Marco Zapletal
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.10.0
>
> Attachments: populatingFailureEndpointProperty.zip
>
>
> We are currently working on the management of failed exchanged. For getting an insight what has happened the Exchange.FAILURE_ENDPOINT delivers valuable information. However, this property gets only populated by endpoints. This means, when using beans, the property is set when the bean is referenced using to(bean://exceptionBean), but not if the bean is referenced using bean(exceptionBean). In the latter case, the property gets either populated using the last endpoint before the bean(...) or not at all. Please see the attached test case.
> Thus, I would like to suggest populating the Exchange.FAILURE_ENDPOINT also for beans that are referenced in the DSL using the .bean() notation
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-5065) Populating
Exchange.FAILURE_ENDPOINT when bean is referenced using bean(...) and
throws Exception
Posted by "Marco Zapletal (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225092#comment-13225092 ]
Marco Zapletal commented on CAMEL-5065:
---------------------------------------
Thanks for the quick response, Claus.
I am fine with your decision, but anyway I would like to give you some additional information on this request:
I agree with you that the TO_ENDPOINT property (which is eventually used to populate the FAILURE_ENDPOINT property) should be reserved for endpoints. However, I think that beans can also be considered as endpoints, which is also reflected by the possibility to call beans as endpoints using bean://...
In order to leverage the built-in functionality of FAILURE_ENDPOINT and stay somehow also "typesafe" in our routes we currently do the following:
- Each of our beans has a public static final String attribute NAME
- Have an Endpoints class containing a bunch of static final Strings - each of those refers to a bean using the endpoint notation and the NAME attribute of the respective bean
- use the string constants of the Endpoints class to refer to bean as endpoints in the routes (i.e., to(Endpoints.MY_BEAN)...)
- Annotate the beans with @Component to get auto-discovered by Spring
The other approach could be to write an interceptor, which sets the TO_ENDPOINT property also for beans. But I am not sure whether it is desirable to intervene (overwrite) standard camel behavior.
> Populating Exchange.FAILURE_ENDPOINT when bean is referenced using bean(...) and throws Exception
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5065
> URL: https://issues.apache.org/jira/browse/CAMEL-5065
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.9.1
> Reporter: Marco Zapletal
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.10.0
>
> Attachments: populatingFailureEndpointProperty.zip
>
>
> We are currently working on the management of failed exchanged. For getting an insight what has happened the Exchange.FAILURE_ENDPOINT delivers valuable information. However, this property gets only populated by endpoints. This means, when using beans, the property is set when the bean is referenced using to(bean://exceptionBean), but not if the bean is referenced using bean(exceptionBean). In the latter case, the property gets either populated using the last endpoint before the bean(...) or not at all. Please see the attached test case.
> Thus, I would like to suggest populating the Exchange.FAILURE_ENDPOINT also for beans that are referenced in the DSL using the .bean() notation
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CAMEL-5065) Populating Exchange.FAILURE_ENDPOINT
when bean is referenced using bean(...) and throws Exception
Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-5065.
--------------------------------
Resolution: Won't Fix
Fix Version/s: 2.10.0
Assignee: Claus Ibsen
> Populating Exchange.FAILURE_ENDPOINT when bean is referenced using bean(...) and throws Exception
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-5065
> URL: https://issues.apache.org/jira/browse/CAMEL-5065
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.9.1
> Reporter: Marco Zapletal
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.10.0
>
> Attachments: populatingFailureEndpointProperty.zip
>
>
> We are currently working on the management of failed exchanged. For getting an insight what has happened the Exchange.FAILURE_ENDPOINT delivers valuable information. However, this property gets only populated by endpoints. This means, when using beans, the property is set when the bean is referenced using to(bean://exceptionBean), but not if the bean is referenced using bean(exceptionBean). In the latter case, the property gets either populated using the last endpoint before the bean(...) or not at all. Please see the attached test case.
> Thus, I would like to suggest populating the Exchange.FAILURE_ENDPOINT also for beans that are referenced in the DSL using the .bean() notation
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira