Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 50280 invoked from network); 9 Jan 2011 16:33:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Jan 2011 16:33:09 -0000 Received: (qmail 90304 invoked by uid 500); 9 Jan 2011 16:33:09 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 90109 invoked by uid 500); 9 Jan 2011 16:33:09 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 90049 invoked by uid 500); 9 Jan 2011 16:33:07 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 90046 invoked by uid 99); 9 Jan 2011 16:33:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jan 2011 16:33:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jan 2011 16:33:07 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p09GWkeR026438 for ; Sun, 9 Jan 2011 16:32:46 GMT Message-ID: <6873195.240611294590766893.JavaMail.jira@thor> Date: Sun, 9 Jan 2011 11:32:46 -0500 (EST) From: =?utf-8?Q?Christian_M=C3=BCller_=28JIRA=29?= To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-3515) Improve the bean parameter binding parameterType option In-Reply-To: <2484947.236791294560526237.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-3515?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian M=C3=BCller updated CAMEL-3515: ------------------------------------ Fix Version/s: (was: 2.6.0) 2.7.0 Summary: Improve the bean parameter binding parameterType option = (was: Add documentation for the new type option on bean component) > 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=C3=BCller > 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 !=3D null) { > return exchange.getContext().getClassResolver().resolveCl= ass((String) value); > } else { > return ObjectHelper.loadClass((String) value); > } > } else { > return null; > } > } > {code} --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.