You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "James Strachan (JIRA)" <ji...@apache.org> on 2008/10/21 10:32:52 UTC
[jira] Created: (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
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
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.
[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
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50533#action_50533 ]
Claus Ibsen commented on CAMEL-1005:
------------------------------------
Yes better with a new one, but then we gotta come up with a good name and parameter, or just name.
The purpose is to quickly being able to mark a method as the one Camel should invoke in a class that might have many methods and thus it could be hard to pick the best one.
And to use annotations for meta data instead of specifying method=xxx in the Camel route?
Is @Handler the best name? Isnt it associated with all the web frameworks?
> 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.
[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
Posted by "James Strachan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50528#action_50528 ]
James Strachan commented on CAMEL-1005:
---------------------------------------
If there are multiple possible methods then the same logic as we support now should kick in - throwing an exception due to ambiguous methods.
I guess we could repurpose the @Consumes method but just let folks omit any URI / ref?
> 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.
[jira] Updated: (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
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-1005:
-------------------------------
Fix Version/s: (was: 2.0.0)
2.1.0
> 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.1.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.
[jira] Assigned: (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
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-1005:
----------------------------------
Assignee: Claus Ibsen
> 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.
[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
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50531#action_50531 ]
Claus Ibsen commented on CAMEL-1005:
------------------------------------
What if @Consumes had a special parameter for this purpose, if we can get a good name?
> 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.
[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
Posted by "James Strachan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50532#action_50532 ]
James Strachan commented on CAMEL-1005:
---------------------------------------
I think I'd rather a new annotation than require a parameter value on an existing one.
> 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.
[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
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ 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.
[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
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51756#action_51756 ]
Claus Ibsen commented on CAMEL-1005:
------------------------------------
Yes @Handler is the best name. When its defined Camel will use this when it looks for method candidates.
> 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.1.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.
[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
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48860#action_48860 ]
Claus Ibsen commented on CAMEL-1005:
------------------------------------
Should definitely have a better name than @Handler
The @Body workaround is maybe not to obvious but will of course work as Camel will prefer annotated methods.
> 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
> 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.
[jira] Resolved: (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
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-1005.
--------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.1.0)
2.0.0
trunk: 775955.
Updated wiki page as well for Bean Integration.
@Handler is the name
> 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.