You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Yuri Schimke (JIRA)" <ji...@apache.org> on 2009/10/16 10:49:53 UTC

[jira] Created: (CAMEL-2071) Camel Bean component should support methodName and arguments

Camel Bean component should support methodName and arguments
------------------------------------------------------------

                 Key: CAMEL-2071
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2071
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Yuri Schimke


When using the Bean component methodName stops working if you have overloaded methods with that name.  However in the case where the argument type of one of the overloaded forms matches the body, then this should be used in preference to a method with a different name but same argument type.

Currently the following error is thrown

            <to uri="bean:myBean?method=createInstructions" />
	
org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public final void $Proxy47.someOtherMethod(XXX), public final InstructionSet $Proxy47.createInstructions(XXX)] on the exchange: Exchange[Message: XXX]	
	
interface MyBean {
public void someOtherMethod(XXX x);
public InstructionSet  createInstructions(XXX x);
public InstructionSet  createInstructions(YYY y);
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-2071) Camel Bean component should support methodName and arguments

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-2071.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0

trunk: 826591.

Now Camel is better at picking methods.

Specifying parameters is not implemented as its not the right solution. What should happen if you specify parameters Camel cannot map, and whatnot.

> Camel Bean component should support methodName and arguments
> ------------------------------------------------------------
>
>                 Key: CAMEL-2071
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2071
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Yuri Schimke
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> When using the Bean component methodName stops working if you have overloaded methods with that name.  However in the case where the argument type of one of the overloaded forms matches the body, then this should be used in preference to a method with a different name but same argument type.
> Currently the following error is thrown
>             <to uri="bean:myBean?method=createInstructions" />
> 	
> org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public final void $Proxy47.someOtherMethod(XXX), public final InstructionSet $Proxy47.createInstructions(XXX)] on the exchange: Exchange[Message: XXX]	
> 	
> interface MyBean {
> public void someOtherMethod(XXX x);
> public InstructionSet  createInstructions(XXX x);
> public InstructionSet  createInstructions(YYY y);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2071) Camel Bean component should support methodName and arguments

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54789#action_54789 ] 

Claus Ibsen commented on CAMEL-2071:
------------------------------------

Which version of Camel are you using?

> Camel Bean component should support methodName and arguments
> ------------------------------------------------------------
>
>                 Key: CAMEL-2071
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2071
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Yuri Schimke
>
> When using the Bean component methodName stops working if you have overloaded methods with that name.  However in the case where the argument type of one of the overloaded forms matches the body, then this should be used in preference to a method with a different name but same argument type.
> Currently the following error is thrown
>             <to uri="bean:myBean?method=createInstructions" />
> 	
> org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public final void $Proxy47.someOtherMethod(XXX), public final InstructionSet $Proxy47.createInstructions(XXX)] on the exchange: Exchange[Message: XXX]	
> 	
> interface MyBean {
> public void someOtherMethod(XXX x);
> public InstructionSet  createInstructions(XXX x);
> public InstructionSet  createInstructions(YYY y);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2071) Camel Bean component should support methodName and arguments

Posted by "Yuri Schimke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54791#action_54791 ] 

Yuri Schimke commented on CAMEL-2071:
-------------------------------------

2.0.0

> Camel Bean component should support methodName and arguments
> ------------------------------------------------------------
>
>                 Key: CAMEL-2071
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2071
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Yuri Schimke
>
> When using the Bean component methodName stops working if you have overloaded methods with that name.  However in the case where the argument type of one of the overloaded forms matches the body, then this should be used in preference to a method with a different name but same argument type.
> Currently the following error is thrown
>             <to uri="bean:myBean?method=createInstructions" />
> 	
> org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public final void $Proxy47.someOtherMethod(XXX), public final InstructionSet $Proxy47.createInstructions(XXX)] on the exchange: Exchange[Message: XXX]	
> 	
> interface MyBean {
> public void someOtherMethod(XXX x);
> public InstructionSet  createInstructions(XXX x);
> public InstructionSet  createInstructions(YYY y);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2071) Camel Bean component should support methodName and arguments

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54805#action_54805 ] 

Claus Ibsen commented on CAMEL-2071:
------------------------------------

I am looking into this about the overloaded method and picking the one with the best matched type.

> Camel Bean component should support methodName and arguments
> ------------------------------------------------------------
>
>                 Key: CAMEL-2071
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2071
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Yuri Schimke
>            Assignee: Claus Ibsen
>
> When using the Bean component methodName stops working if you have overloaded methods with that name.  However in the case where the argument type of one of the overloaded forms matches the body, then this should be used in preference to a method with a different name but same argument type.
> Currently the following error is thrown
>             <to uri="bean:myBean?method=createInstructions" />
> 	
> org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public final void $Proxy47.someOtherMethod(XXX), public final InstructionSet $Proxy47.createInstructions(XXX)] on the exchange: Exchange[Message: XXX]	
> 	
> interface MyBean {
> public void someOtherMethod(XXX x);
> public InstructionSet  createInstructions(XXX x);
> public InstructionSet  createInstructions(YYY y);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-2071) Camel Bean component should support methodName and arguments

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-2071:
----------------------------------

    Assignee: Claus Ibsen

> Camel Bean component should support methodName and arguments
> ------------------------------------------------------------
>
>                 Key: CAMEL-2071
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2071
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Yuri Schimke
>            Assignee: Claus Ibsen
>
> When using the Bean component methodName stops working if you have overloaded methods with that name.  However in the case where the argument type of one of the overloaded forms matches the body, then this should be used in preference to a method with a different name but same argument type.
> Currently the following error is thrown
>             <to uri="bean:myBean?method=createInstructions" />
> 	
> org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public final void $Proxy47.someOtherMethod(XXX), public final InstructionSet $Proxy47.createInstructions(XXX)] on the exchange: Exchange[Message: XXX]	
> 	
> interface MyBean {
> public void someOtherMethod(XXX x);
> public InstructionSet  createInstructions(XXX x);
> public InstructionSet  createInstructions(YYY y);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.