[
https://issues.apache.org/jira/browse/CAMEL-6130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13595099#comment-13595099
]
Aaron Whiteside commented on CAMEL-6130:
----------------------------------------
Forth patch, this one gets all the possible setter methods. And then tries to
inject each one until it succeeds or fails (due to conversion error or one of
the setter methods throws an error).
I added a todo comment, because I think we should really be suppressing these
errors instead of just failing outright? But currently the existing behavior is
preserved and all camel-core unit tests pass.
I've taken a look at OSGiIntegrationTestSupport used in tests/camel-itest-osgi
and I can see that we never actually use the real OsgiServiceRegistry the
JndiRegistry is always used by default.
I'll continue to look at adding a real OSGi test, but in the meantime is the
latest patch good enough to be applied?
> EndpointHelper.setReferenceProperties() does not work with OSGiServiceRegistry
> ------------------------------------------------------------------------------
>
> Key: CAMEL-6130
> URL: https://issues.apache.org/jira/browse/CAMEL-6130
> Project: Camel
> Issue Type: Bug
> Components: osgi
> Affects Versions: 2.9.5, 2.10.4
> Reporter: Aaron Whiteside
> Priority: Critical
> Fix For: 2.9.7, 2.10.5, 2.11.0
>
> Attachments: CAMEL-6130-2.patch, CAMEL-6130-3.patch,
> CAMEL-6130-4_.patch, CAMEL-6130.patch
>
>
> EndpointHelper.setReferenceProperties() does not work with OSGiServiceRegistry
> setReferenceProperties() is hard-coded to lookup services of type
> Object.class.
> It should use reflection to determine the type that the setter method accepts
> and then use that type to lookup the reference in the service registry.
> At the moment this issue is stopping #bean references in Endpoints from being
> resolved when using an OSGiServiceRegistry, in OSGi you need to know the
> class of the service you want before hand.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira