Hi,

On 22.08.2010 05:41, Carl Hall wrote:
> I have 2 references to the same interface in a service.  There should be
> multiple impls of this interface in the system, and I'd like to target one
> of them as a default service.  I seem to have this wired up according to the
> admin console (see below), but we I get into the class, the first noted
> reference below is actually null.  I've added a check to my bind method for
> the second reference below to set the first reference according to the
> target filter.
> 
> Any ideas why "defaultSearchProcessor" says it is "Satisfied" but it is null
> in the service where these references are defined?  The service itself is
> "active".

I cannot tell, why your reference is null. What the below list shows, is
that the defaultSearchProcessor is satisified and actually bound. So
your bind mehtod for the defaultSearchProcessor should have been called.

Unless you don't have such a method, or the method threw an exception
(which would be logged, though).

BTW: What version of Apache Felix SCR/Declarative Services are you using ?

Regards
Felix

> 
> 
> Reference defaultSearchProcessor
> ["Satisfied","Service Name:
> org.sakaiproject.nakamura.api.search.SearchResultProcessor","Target Filter:
> (&(sakai.search.processor.default=true))","Multiple: single","Optional:
> mandatory","Policy: static","Bound Service ID 589
> (org.sakaiproject.nakamura.search.processors.NodeSearchResultProcessor)"]
> 
> Reference SearchResultProcessor
> ["Satisfied","Service Name:
> org.sakaiproject.nakamura.api.search.SearchResultProcessor","Multiple:
> multiple","Optional: optional","Policy: dynamic","Bound Service ID 608
> (ContentSearchResultProcessor)","Bound Service ID 609
> (org.sakaiproject.nakamura.connections.ConnectionSearchResultProcessor)","Bound
> Service ID 604
> (org.sakaiproject.nakamura.site.search.SiteSearchResultProcessor)","Bound
> Service ID 591
> (org.sakaiproject.nakamura.search.processors.PagecontentSearchResultProcessor)","Bound
> Service ID 600
> (org.sakaiproject.nakamura.discussion.searchresults.CommentSearchResultProcessor)","Bound
> Service ID 598
> (org.sakaiproject.nakamura.presence.search.UserSearchResultProcessor)","Bound
> Service ID 610
> (org.sakaiproject.nakamura.connections.ConnectionFinderSearchResultProcessor)","Bound
> Service ID 589
> (org.sakaiproject.nakamura.search.processors.NodeSearchResultProcessor)","Bound
> Service ID 611
> (org.sakaiproject.nakamura.message.MessageSearchResultProcessor)"]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to