You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by homeration <ch...@orange.fr> on 2014/01/31 15:43:56 UTC

Service reference binding and availability

I have a problem with multiple service binding and service availability. 

I use a RegistryService instance that register services with a reference
listener like this : 

<bean id="RegistryService" class="..." />

<reference-list interface="com.Service" availability="optional">
           <reference-listener ref="RegistryService"
bind-method="registerService" 
                         unbind-method="unregisterService" />
</reference-list>

The reference list may be empty, so I must use "optional" as availability. 

When I deploy a service, I noticed that it is immediately referenced into my
registry even if it has not started. 
So, when I invoke a method on a binded service that is starting up, the call
is blocked until the service is started. 
In this case, I need to set a timeout on a service method call or may not
register a non started service. 

What is the easiest way to do so? 

Regards, 

Christophe.



--
View this message in context: http://karaf.922171.n3.nabble.com/Service-reference-binding-and-availability-tp4031448.html
Sent from the Karaf - User mailing list archive at Nabble.com.