[
https://issues.apache.org/jira/browse/ARIES-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15234947#comment-15234947
]
Guillaume Nodet commented on ARIES-1525:
----------------------------------------
I also don't think the provider should deal with the OSGi service registry
directly, but it should be given a simple interface instead:
{code}
public interface ServiceFactory {
Object get();
void unget();
}
{code}
The benefit is that when services are provided through extenders (blueprint,
scr, etc...), the service instantiation may be delayed until the service is
actually needed. This is an optimization, as it also avoids loading all the
needed classes from the bundle until the service is actually created.
It could be configurable, so that you could choose between a lazy / eager
policy.
> The RSA core should not get the service before it is needed
> ------------------------------------------------------------
>
> Key: ARIES-1525
> URL: https://issues.apache.org/jira/browse/ARIES-1525
> Project: Aries
> Issue Type: Improvement
> Components: Remote Service Admin
> Reporter: Guillaume Nodet
> Fix For: rsa-2.0.0
>
>
> {{RemoteServiceAdminCore#exportService}} get the service implementation from
> the OSGi registry and pass it as an argument to the {{DistributionProvider}}.
>
> I think this should be delayed until the service is actually used.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)