You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/03/13 15:47:39 UTC
[jira] Commented: (CAMEL-1005) should we have an annotation - maybe
@Handler or something which can mark a method as being the default method
invoked by the Bean Binding if no other Camel annotations are used to bind
parameters
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50524#action_50524 ]
Claus Ibsen commented on CAMEL-1005:
------------------------------------
James what if there are other annotations?
{code}
public class Cheese {
public void foo(@Body String bar) {...}
@Handler
public void bar(String cheese) {...}
public void baz(Object ham)
{code}
What should happen? It should choose the *foo* method, but the @Handler does *stand* out much more since its a method annotation.
So I am not keen on this. What if it was the reverse. That it would always choose the @Handler if there are multiple choices?
> should we have an annotation - maybe @Handler or something which can mark a method as being the default method invoked by the Bean Binding if no other Camel annotations are used to bind parameters
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-1005
> URL: https://issues.apache.org/activemq/browse/CAMEL-1005
> Project: Apache Camel
> Issue Type: Improvement
> Reporter: James Strachan
> Assignee: Claus Ibsen
> Priority: Trivial
> Fix For: 2.0.0
>
>
> e.g.
> {code}
> public class Cheese {
> public void foo(String bar) {...}
> @Handler
> public void bar(String cheese) {...}
> {code}
> Then if we did
> {code}
> from("seda:foo").bean(Cheese.class);
> {code}
> it'd be obvious.
> I guess its pretty low priority as follks could always do
> {code}
> public class Cheese {
> public void foo(String bar) {...}
> public void bar(@Body String cheese) {...}
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.