Hi Radjini,
> You cannot set servicefactory to true inside an immediate
> component. Since the service is not registered by OSGi DS in
> the OSGi registry in this case, implementation.osgi never
> finds it - hence the infinite loop.
Yes, configuring it in this way makes no sense. A warning would be nice
:-)
> With immediate=false, I would have expected a new instance to
> be created for Gamma for each conversation.
>
> Could you check if the following are true?
>
>
> 1. GammaImpl should contain the annotation
> @Scope("CONVERSATION") on
> the class. Not necessarily conversation - anything other
> than COMPOSITE.
Yes, this is true. It is marked with @Scope("CONVERSATION")
> 2. The bundle containing GammaImpl should import
> org.osoa.sca.annotations
> (ie. @Scope annotation should be visible from the bundle)
Yes, this is also true
> 3. If 1) and 2) are true, could you breakpoint in the
> constructor of
> GammaImpl (or anywhere in that class) and check that you
> have a bundle
> installed with name "dummy.sca.xxxxx"? implementation.osgi
> should be using a
> dummy bundle to get a reference to the Gamma service if it
> has identified
> that the scope is not composite.
I could not see a bundle "dummy.sca.*" in the equinox console.
While debugging, I noticed the following in class OSGiInstanceWrapper:
In line 119
if (!annotationProcessor.getScope().equals(Scope.COMPOSITE))
the getScope() returns "COMPOSITE", not "CONVERSATION"
So line 118
refBundle = getDummyReferenceBundle();
is not executed
So it seems that the annotation was not found or not processed
correctly.
After some further debugging:
In OSGiImplementationProvider in line 162 implementation.getClassList()
returns an empty list.
Therefore method processAnnotations() of class OSGiAnnotations has no
classes to iterate over an leaves the default scope to "COMPOSITE".
Maybe there's something missing in the bundles manifest file ? What
should be included in this calls list and where/how is it configured.
Or am I on a wrong track ?
Bye,
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]