André Ricardo da Silva Souza created CAMEL-7418:
---------------------------------------------------
Summary: 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é Ricardo da Silva Souza
I guess this line isn't correct:
if (type.isInstance(pair.getClass()) ||
type.getName().equals(pair.getClassName()))
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()))) ||
type.getName().equals(pair.getClassName()))
I've tried to test a transacted route, but i couldnt because the error:
Failed to create route route1 at: >>> Transacted[] <<< in route:
Route(route1)[[From[direct:start]] -> [Transacted[]]] because of No bean could
be found in the registry of type: PlatformTransactionManager
--
This message was sent by Atlassian JIRA
(v6.2#6252)