Hi there, 
        
The issue FACILITIES-ISSUE-111 was just created by Rui Silvestre 
(rui.silvestre).
        
        Key: FACILITIES-ISSUE-111
        Summary: Startable Facility / Array dependency problem
        Type: Bug
        Importance: Medium
        
        Description:
        Hi, I am having a problem which I think is related to the startable 
factory / array parameters. 
If I have the configuration file below and start my windsor container 
it breaks with an exception of type 
[Castle.MicroKernel.Resolvers.DependencyResolverException] = {"Could 
not resolve non-optional dependency for 'GuiManager' (*.GuiManager). 
Parameter 'UptimeCounter' type '*.ITimeCounter'"} 
>From the debug I made I can see that the GuiManager behaves has if it 
has no dependencies, when it has one of "Array Of ITimeCounter". 
However, if the UtimeCounter is declared first in the configuration 
file, all works correctly. 
Isn't the Startable service supposed to wait for the dependencies to 
be registered before starting the service? 
If I change the constructor of GuiManager by eliminating the array and 
passing only an instance of ITimeCounter (and also change the config 
file accordingly) all works correctly, with the same config file that 
causes an error. 
<component id="GuiManager" type="*.GuiManager, *" 
service="*.IGuiManager, *"> 
<parameters> 
<timers> 
 <array type="*.ITimeCounter, *"> 
   <item>${UptimeCounter}</item> 
   <item>${UptimeCounter}</item> 
  </array> 
</timers> 
</parameters> 
</component> 
<component id="UptimeCounter" type="*.TimeCounter, *" 
service="*.ITimeCounter, *" /> 
public class GuiManager : IGuiManager, IStartable 
{ 
public GuiManager(ITimeCounter[] timers) { ? } 
} 
        
For more, see 
http://support.castleproject.org/projects/FACILITIES/issues/view/FACILITIES-ISSUE-111
 
        
--
donjon
by Castle Stronghold
http://www.castle-donjon.com



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to