[
https://issues.apache.org/jira/browse/FELIX-3949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tuomas Kiviaho updated FELIX-3949:
----------------------------------
Description:
I'd like to track 'org.apache.ace.identification.Identification' instances in
order to pull out properties from respective service references. Problem is
that in order to do this I'd have to import the ACE specific package even when
I'm only interested in the service reference properties.
I tried to be clever and use only filter to achieve the this but noticed that
service name is always required although service tracker could function happily
only with service name.
ServiceDependencyImpl has this restriction only in start(DependencyService) and
for this reason setService() method forces the service name to be Object.class
when I only declare the service filter. This causes the actual filter to be
padded with (OBJECTCLASS=java.langObject) which is the reason why my attempt
did not work.
By fixing these two places, the service name could be made optional.
TemporalServiceDependencyImpl should also verify that the service name has
actually been declared and ComponentImpl.configureImplementation should allow
field injection even when service name hasn't been declared.
was:
I'd like to track 'org.apache.ace.identification.Identification' instances in
order to pull out properties from respective service references. Problem is
that in order to do this I'd have to import the ACE specific package even when
I'm only interested in the service reference properties.
I tried to be clever and use only filter to achieve the this but noticed that
service name is always required although service tracker could function happily
only with service name.
ServiceDependencyImpl has this restriction only in start(DependencyService) and
for this reason setService() method forces the service name to be Object.class
when I only declare the service filter. This causes the actual filter to be
padded with (OBJECTCLASS=java.langObject) which is the reason why my attempt
did not work.
By fixing these two places, the service name could be made optional.
TemporalServiceDependency should also verify that the service name has actually
been declared.
> ServiceDependency declaration without service name
> --------------------------------------------------
>
> Key: FELIX-3949
> URL: https://issues.apache.org/jira/browse/FELIX-3949
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Reporter: Tuomas Kiviaho
> Priority: Minor
> Attachments: ServiceDependencyImpl.patch
>
>
> I'd like to track 'org.apache.ace.identification.Identification' instances in
> order to pull out properties from respective service references. Problem is
> that in order to do this I'd have to import the ACE specific package even
> when I'm only interested in the service reference properties.
> I tried to be clever and use only filter to achieve the this but noticed that
> service name is always required although service tracker could function
> happily only with service name.
> ServiceDependencyImpl has this restriction only in start(DependencyService)
> and for this reason setService() method forces the service name to be
> Object.class when I only declare the service filter. This causes the actual
> filter to be padded with (OBJECTCLASS=java.langObject) which is the reason
> why my attempt did not work.
> By fixing these two places, the service name could be made optional.
> TemporalServiceDependencyImpl should also verify that the service name has
> actually been declared and ComponentImpl.configureImplementation should allow
> field injection even when service name hasn't been declared.
--
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