felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <ben...@basistech.com>
Subject Backtrace for intentionally circular dependency
Date Wed, 24 Feb 2016 15:40:27 GMT
I have two components that have a pseudo-circular dependency.


Component 'WorkerInterface' has a reference like:


@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy =
ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)
public void setWorkerComponentService(WorkerComponentService
workerComponentService) { ... }

one of the components that provides 'WorkerComponentService' has:

    @Reference(cardinality = ReferenceCardinality.OPTIONAL, policy =
ReferencePolicy.DYNAMIC, unbind = "unbindWorkerInterface")
    public void setWorkerInterface(WorkerInterface workerInterface) { .. }

This all works: The second activates, the first activates, and then
the second gets called with the reference to the first. However, along
the way, an alarming ERROR-level log message is delivered, as below.

Is there something I could do differently to avoid this? Is it worthy of a JIRA?




2016-02-24 10:25:30,963 | ERROR | lixDispatchQueue |
rosapi-worker-rni-rnt-sdk        | 51 -
com.basistech.ws.rosapi-worker-rni-rnt-sdk - 0.8.101.v20160224031931 |
FrameworkEvent ERROR - com.basistech.ws.rosapi-worker-rni-rnt-sdk

org.osgi.framework.ServiceException: ServiceFactory.getService()
resulted in a cycle.

    at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:301)[org.apache.felix.framework-5.4.0.jar:]

    at org.apache.felix.framework.Felix.getService(Felix.java:3699)[org.apache.felix.framework-5.4.0.jar:]

    at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)[org.apache.felix.framework-5.4.0.jar:]

    at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)[129:org.apache.felix.scr:2.0.2]

    at org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)[129:org.apache.felix.scr:2.0.2]

    at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2137)[129:org.apache.felix.scr:2.0.2]

    at org.apache.felix.scr.impl.manager.DependencyManager$SingleDynamicCustomizer.prebind(DependencyManager.java:872)[129:org.apache.felix.scr:2.0.2]

    at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1457)[129:org.apache.felix.scr:2.0.2]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:983)[129:org.apache.felix.scr:2.0.2]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message