avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Laurenzo" <TerryLaure...@amexbf.com>
Subject PATCH: Fix for incorrect service dependencies when using {} or []
Date Mon, 03 Mar 2003 20:12:21 GMT
I have posted this to BugZilla under 17617. I am including it here for discussion as well.

Dependency maps are not being properly maintained when using the new {} and []
postfix operators on dependency descriptors. When using these, only the first
"provide" in the assembly.xml file is being considered a real dependency. This
is due to the visitDependencies method in
org.apache.avalon.phoenix.components.application.DependencyGraph retrieving the
first DependencyMetaData by key instead of retrieving all of them with the same
key. 

My proposed fix includes a change to this class and an additional method added
to org.apache.avalon.phoenix.containerkit.metadata.ComponentMetaData
(getAllDependenciesByKey) that returns an array of DependencyMetaData instances
for the given key.

The symptom of this problem is that null is being put into the ServiceManager of
a block that uses multiple provide elements with the same array or map key.

Please include these changes or another appropriate fix in the source tree.

Thanks!
Terry Laurenzo

 <<DependencyGraph.java>>  <<ComponentMetaData.java>> 

Mime
View raw message