Hi, First, iPOJO instances are either valid or invalid. Basically, an invalid instance is an instance requiring a non-available service. An invalid instance should stops the created threads avoiding those kind of access (thanks to the lifecycle callbacks). if despite this, a thread tries to access to a unavailable service, iPOJO fire a warning and 'null' is returned.
However, temporal dependencies have a different behavior. When a thread try to use a temporal dependency on an unavailable service, the thread waits (is stopped) until a timeout (the default is 3s, but can be configured). If the timeout is reached (and the service stills unavailable), the temporal dependency executes a 'onTimeout' action. By default, it throws a RuntimeException (equivalent to the ServiceUnavailableException). However, others policies are also available: - injecting a Nullable object - inject a default-implementation object - injection an empty array (only for aggregate dependency) - injection 'null' To answer to the second question: iPOJO instances have a direct access on service objects. Regards, Clement -----Original Message----- From: Todor Boev [mailto:[EMAIL PROTECTED] Sent: lundi 27 octobre 2008 13:44 To: [email protected] Subject: IPojo - ServiceUnavailableException? Hello, What does iPojo do if an active component (one running a thread) tries to access a service dependency that is not currently available? Does it cause the call to the dependency to throw something like ServiceUnavailableException? I.e. are the dependencies proxied or are they the raw service objects? Cheers, Todor --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

