felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <ben...@basistech.com>
Subject Re: Backtrace for intentionally circular dependency
Date Wed, 24 Feb 2016 19:43:20 GMT
thanks, I filed https://issues.apache.org/jira/browse/FELIX-5197 and I'll
make the change unless someone else objects.

On Wed, Feb 24, 2016 at 2:29 PM, David Bosschaert <
david.bosschaert@gmail.com> wrote:

> Hi Benson,
>
> I looked at this as well in the past. I think it might be better to log
> this situation on the INFO level rather than error since the system
> recovers from it anyway being optional/dynamic...
>
> My 2c,
>
> David
>
> On 24 February 2016 at 15:40, Benson Margulies <benson@basistech.com>
> wrote:
>
> > 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message