[ 
https://issues.apache.org/jira/browse/CAMEL-3515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979356#action_12979356
 ] 

Christian Müller edited comment on CAMEL-3515 at 1/9/11 11:32 AM:
------------------------------------------------------------------

I think {{parameterType}} is a better name - more clear what it is -> I will 
reopen [CAMEL-3311|https://issues.apache.org/jira/browse/CAMEL-3311] and rename 
it, update the documentation and work on the MethodCallExpression, 
BeanExpression and the unit tests in camel-core and camel-spring.

I will rename this issue to *Improve the bean parameter binding parameterType 
option* and add your ideas:
{code}
.to("bean:foo?method=bar(java.io.InputStream)")
{code}

and

{code}
.to("bean:foo?method=bar(String,int)")
{code}

and move it to Camel 2.7.
Then our users has a solution for the AmbiguousMethodCallException in Camel 2.6 
and will get a more elegant solution in 2.7.

      was (Author: muellerc):
    I think {{parameterType}} is a better name - more clear what it is -> I 
will reopen [CAMEL-3311|https://issues.apache.org/jira/browse/CAMEL-3311] and 
rename it, update the documentation and work on the MethodCallExpression, 
BeanExpression and the unit tests in camel-core and camel-spring.

I will rename this issue to *Improve the bean parameter binding parameterType 
option* and add your ideas:
{code}
.to("bean:foo?method=bar("java.io.InputStream"))
{code}

and

{code}
.to("bean:foo?method=bar("String,int"))
{code}

and move it to Camel 2.7.
Then our users has a solution for the AmbiguousMethodCallException in Camel 2.6 
and will get a more elegant solution in 2.7.
  
> Improve the bean parameter binding parameterType option
> -------------------------------------------------------
>
>                 Key: CAMEL-3515
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3515
>             Project: Camel
>          Issue Type: Sub-task
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Christian Müller
>            Priority: Minor
>             Fix For: 2.7.0
>
>
> We need this new feature documented
> http://camel.apache.org/bean
> And we need this option on the these
> - MethodCallExpression
> - BeanExpression
> And we need unit tests which uses the method call expression in
> - camel-core
> - camel-spring
> Also the String -> Class converter should use the ClassResolver API from 
> CamelContext. This ensure it runs in OSGi, JBoss, J2EE etc.
> What you do is just add Exchange as the 2nd parameter and Camel provides it 
> to you
> {code}
>     /**
>      * Returns the converted value, or null if the value is null
>      */
>     @SuppressWarnings("rawtypes")
>     @Converter
>     public static Class toClass(Object value, Exchange exchange) {
>         if (value instanceof Class) {
>             return (Class) value;
>         } else if (value instanceof String) {
>             // prefer to use class resolver API
>             if (exchange != null) {
>                 return 
> exchange.getContext().getClassResolver().resolveClass((String) value);
>             } else {
>                 return ObjectHelper.loadClass((String) value);
>             }
>         } else {
>             return null;
>         }
>     }
> {code}

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

Reply via email to