You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Vincent MATHON (JIRA)" <ji...@apache.org> on 2011/08/02 11:06:27 UTC
[jira] [Created] (CAMEL-4293) @Bean method name is ignored
@Bean method name is ignored
----------------------------
Key: CAMEL-4293
URL: https://issues.apache.org/jira/browse/CAMEL-4293
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.8.0
Environment: Win7, Java 1.6_25, Eclipse Helios, m2Eclipse, maven 3.x
Reporter: Vincent MATHON
Since 2.8.0 Exchange.BEAN_METHOD_NAME is always used instead of @Bean method name (see BeanInfo.createInvocation(Object pojo, Exchange exchange)). As a consequence, the wrong method is choosen when I use a beanref invokation on a method that uses @Bean
parameter binding.
I built a simple test case as a zip file containing an Eclipse Helios maven project (see attachment). The test fails with camel 2.8.0 and succeeds with 2.7.3 and earlier (at least until 2.6.0).
regards
Vincent MATHON
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CAMEL-4293) @Bean method name is ignored
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-4293.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.9.0
Thanks for reporting and providing a sample to demonstrate the issue.
> @Bean method name is ignored
> ----------------------------
>
> Key: CAMEL-4293
> URL: https://issues.apache.org/jira/browse/CAMEL-4293
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.0
> Environment: Win7, Java 1.6_25, Eclipse Helios, m2Eclipse, maven 3.x
> Reporter: Vincent MATHON
> Assignee: Claus Ibsen
> Fix For: 2.9.0
>
> Attachments: camel-bug-2.8.0.zip
>
>
> Since 2.8.0 Exchange.BEAN_METHOD_NAME is always used instead of @Bean method name (see BeanInfo.createInvocation(Object pojo, Exchange exchange)). As a consequence, the wrong method is choosen when I use a beanref invokation on a method that uses @Bean
> parameter binding.
> I built a simple test case as a zip file containing an Eclipse Helios maven project (see attachment). The test fails with camel 2.8.0 and succeeds with 2.7.3 and earlier (at least until 2.6.0).
> regards
> Vincent MATHON
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-4293) @Bean method name is ignored
Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vincent MATHON updated CAMEL-4293:
----------------------------------
Attachment: camel-bug-2.8.0.zip
> @Bean method name is ignored
> ----------------------------
>
> Key: CAMEL-4293
> URL: https://issues.apache.org/jira/browse/CAMEL-4293
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.0
> Environment: Win7, Java 1.6_25, Eclipse Helios, m2Eclipse, maven 3.x
> Reporter: Vincent MATHON
> Attachments: camel-bug-2.8.0.zip
>
>
> Since 2.8.0 Exchange.BEAN_METHOD_NAME is always used instead of @Bean method name (see BeanInfo.createInvocation(Object pojo, Exchange exchange)). As a consequence, the wrong method is choosen when I use a beanref invokation on a method that uses @Bean
> parameter binding.
> I built a simple test case as a zip file containing an Eclipse Helios maven project (see attachment). The test fails with camel 2.8.0 and succeeds with 2.7.3 and earlier (at least until 2.6.0).
> regards
> Vincent MATHON
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4293) @Bean method name is ignored
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078883#comment-13078883 ]
Claus Ibsen commented on CAMEL-4293:
------------------------------------
I can see your issue as you use @Bean in the method signature, and thus it uses the method name that was used to invoke itself. That of course is not expected.
However if you do route to a bean, and provide a header with a method name, then that header is being used.
> @Bean method name is ignored
> ----------------------------
>
> Key: CAMEL-4293
> URL: https://issues.apache.org/jira/browse/CAMEL-4293
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.0
> Environment: Win7, Java 1.6_25, Eclipse Helios, m2Eclipse, maven 3.x
> Reporter: Vincent MATHON
> Attachments: camel-bug-2.8.0.zip
>
>
> Since 2.8.0 Exchange.BEAN_METHOD_NAME is always used instead of @Bean method name (see BeanInfo.createInvocation(Object pojo, Exchange exchange)). As a consequence, the wrong method is choosen when I use a beanref invokation on a method that uses @Bean
> parameter binding.
> I built a simple test case as a zip file containing an Eclipse Helios maven project (see attachment). The test fails with camel 2.8.0 and succeeds with 2.7.3 and earlier (at least until 2.6.0).
> regards
> Vincent MATHON
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CAMEL-4293) @Bean method name is ignored
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-4293:
----------------------------------
Assignee: Claus Ibsen
> @Bean method name is ignored
> ----------------------------
>
> Key: CAMEL-4293
> URL: https://issues.apache.org/jira/browse/CAMEL-4293
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.0
> Environment: Win7, Java 1.6_25, Eclipse Helios, m2Eclipse, maven 3.x
> Reporter: Vincent MATHON
> Assignee: Claus Ibsen
> Attachments: camel-bug-2.8.0.zip
>
>
> Since 2.8.0 Exchange.BEAN_METHOD_NAME is always used instead of @Bean method name (see BeanInfo.createInvocation(Object pojo, Exchange exchange)). As a consequence, the wrong method is choosen when I use a beanref invokation on a method that uses @Bean
> parameter binding.
> I built a simple test case as a zip file containing an Eclipse Helios maven project (see attachment). The test fails with camel 2.8.0 and succeeds with 2.7.3 and earlier (at least until 2.6.0).
> regards
> Vincent MATHON
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4293) @Bean method name is ignored
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078880#comment-13078880 ]
Claus Ibsen commented on CAMEL-4293:
------------------------------------
The *header* always takes precedence. This is by design, and older Camel releases had this as a bug.
> @Bean method name is ignored
> ----------------------------
>
> Key: CAMEL-4293
> URL: https://issues.apache.org/jira/browse/CAMEL-4293
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.0
> Environment: Win7, Java 1.6_25, Eclipse Helios, m2Eclipse, maven 3.x
> Reporter: Vincent MATHON
> Attachments: camel-bug-2.8.0.zip
>
>
> Since 2.8.0 Exchange.BEAN_METHOD_NAME is always used instead of @Bean method name (see BeanInfo.createInvocation(Object pojo, Exchange exchange)). As a consequence, the wrong method is choosen when I use a beanref invokation on a method that uses @Bean
> parameter binding.
> I built a simple test case as a zip file containing an Eclipse Helios maven project (see attachment). The test fails with camel 2.8.0 and succeeds with 2.7.3 and earlier (at least until 2.6.0).
> regards
> Vincent MATHON
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4293) @Bean method name is ignored
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078911#comment-13078911 ]
Claus Ibsen commented on CAMEL-4293:
------------------------------------
Thanks Vincent. I have reproduced your issue. The problem is that you do a bean invocation inside another bean invocation (eg since you use @Bean on the bean you invoke). And thus the @Bean sees the header which is should not affect it.
> @Bean method name is ignored
> ----------------------------
>
> Key: CAMEL-4293
> URL: https://issues.apache.org/jira/browse/CAMEL-4293
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.0
> Environment: Win7, Java 1.6_25, Eclipse Helios, m2Eclipse, maven 3.x
> Reporter: Vincent MATHON
> Assignee: Claus Ibsen
> Attachments: camel-bug-2.8.0.zip
>
>
> Since 2.8.0 Exchange.BEAN_METHOD_NAME is always used instead of @Bean method name (see BeanInfo.createInvocation(Object pojo, Exchange exchange)). As a consequence, the wrong method is choosen when I use a beanref invokation on a method that uses @Bean
> parameter binding.
> I built a simple test case as a zip file containing an Eclipse Helios maven project (see attachment). The test fails with camel 2.8.0 and succeeds with 2.7.3 and earlier (at least until 2.6.0).
> regards
> Vincent MATHON
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-4293) @Bean method name is ignored
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-4293:
-------------------------------
Fix Version/s: 2.8.1
> @Bean method name is ignored
> ----------------------------
>
> Key: CAMEL-4293
> URL: https://issues.apache.org/jira/browse/CAMEL-4293
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.8.0
> Environment: Win7, Java 1.6_25, Eclipse Helios, m2Eclipse, maven 3.x
> Reporter: Vincent MATHON
> Assignee: Claus Ibsen
> Fix For: 2.8.1, 2.9.0
>
> Attachments: camel-bug-2.8.0.zip
>
>
> Since 2.8.0 Exchange.BEAN_METHOD_NAME is always used instead of @Bean method name (see BeanInfo.createInvocation(Object pojo, Exchange exchange)). As a consequence, the wrong method is choosen when I use a beanref invokation on a method that uses @Bean
> parameter binding.
> I built a simple test case as a zip file containing an Eclipse Helios maven project (see attachment). The test fails with camel 2.8.0 and succeeds with 2.7.3 and earlier (at least until 2.6.0).
> regards
> Vincent MATHON
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira