Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D85811D98 for ; Thu, 26 Jun 2014 18:19:26 +0000 (UTC) Received: (qmail 84788 invoked by uid 500); 26 Jun 2014 18:19:26 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 84675 invoked by uid 500); 26 Jun 2014 18:19:26 -0000 Mailing-List: contact issues-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 issues@camel.apache.org Received: (qmail 84541 invoked by uid 99); 26 Jun 2014 18:19:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2014 18:19:25 +0000 Date: Thu, 26 Jun 2014 18:19:25 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-7418) org.apache.camel.impl.JndiRegistry.findByTypeWithName 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-7418?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated CAMEL-7418: ------------------------------- Estimated Complexity: Moderate (was: Novice) > org.apache.camel.impl.JndiRegistry.findByTypeWithName > ----------------------------------------------------- > > Key: CAMEL-7418 > URL: https://issues.apache.org/jira/browse/CAMEL-7418 > Project: Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.13.0 > Reporter: Andr=C3=A9 Ricardo da Silva Souza > Priority: Minor > Fix For: 2.14.0 > > > I guess this line isn't correct: > if (type.isInstance(pair.getClass()) || type.getName().equals(pair.getCla= ssName())) > The variable "pair.getClass()" always returns "javax.naming.NameClassPair= " or its subclasses and the method "isInstance" works only with Instances, = but doesnt Classes. > I think the correct code should be: > if (type.isAssignableFrom(Class.forName(pair.getClassName()))) > I've tried to test a transacted route, but i couldnt because the error:= =20 > Failed to create route route1 at: >>> Transacted[] <<< in route: Route(ro= ute1)[[From[direct:start]] -> [Transacted[]]] because of No bean could be f= ound in the registry of type: PlatformTransactionManager -- This message was sent by Atlassian JIRA (v6.2#6252)