Thanks, we found this circular dependency, :))
But there is still one question about attribute named "optional". How does it work? I thought that when I set in dependency optional="true" and I don't provide
depenedency in block.xml, hasService() will return false.
Before a component is deployed Merlin verifies that the type is in fact deployable (in principal). This means checking that all deployment and runtime dependencies are resolvable and that a candidate provider is assigned. If a dependency is optional and a candidate cannot be assigned, merlin will not halt deployment.
I.e.:
optional == true
merlin applies best efforts to establish a
a candidate before deployment - if a candidate
is not found, deployment will continue -
as such hasService may return falseoptional == false
component dependency must be fulfilled otherwise
deployment will not be allowed - hasService will
always return trueStephen.
Jarek
----- Original Message ----- From: "Stephen McConnell" <[EMAIL PROTECTED]>
To: "Avalon framework users" <[EMAIL PROTECTED]>
Sent: Wednesday, February 25, 2004 6:30 PM
Subject: Re: hasService() and lookup() inconsistent results
Jarosław Pałka wrote:
Hi
Here's a ex.getCause().printStackTrace() result
java.lang.IllegalStateException: Illegal attempt to resolve an service
from
a non-deployed appliance
[appliance:/mrt-vend-client/LocationViewContainerImpl].
The only way you will get this exception is if you have a circular dependency. I.e. A depends on B depends on A, etc. Under 3.2.5 circular dependencies are not supported. Under 3.3 circular dependencies are ok providing the dependent is not referenced during the deployment phase.
Stephen.
--
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/merlin/distributions/latest | |------------------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
