Hello Rui,

I am the project maintainer for the startable facility, please log an issue
on the castle support website:

http://support.castleproject.org

I will attempt to create the error and see if it still occurs on the trunk
version.

There looks to be a couple of issues logged with the similar issue, however
the results are conflicting (one is marked fixed, the other is non-fixed
with a patch).

I will investigate further to determine if the problem still exists,
likewise if you are able to recreate the error with the trunk version it may
be helpful as well.

You can attempt to download a recent build from trunk here:

http://builds.castleproject.org/


Thanks!
Rick Fleming




On Tue, Jan 27, 2009 at 6:45 AM, Rui Silvestre <[email protected]>wrote:

>
> 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) { … }
> }
>
> Do I need to create any kind of subdependency resolver for arrays of
> my type?
> I'm using RC3.
>
> Thanks,
>
> Rui Silvestre
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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