I like that idea. I'll experiment with it and get back to you.
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Ayende Rahien
Sent: Tue 7/18/2006 6:20 PM
To: [email protected]
Subject: Re: [Castle-users] Static dependencies [was Re: Startable facility]
Or make a hard dependency in the ctor for that service, that way you _know_
it is available.
I only use properties for services that would cause a cycle otherwise.
If you write a windows service, I suggest you make something like:
Public StarterService(IStartable [] stratables)
{
}
Then, register all the startable components like this:
<component id=".." type="..">
<parameters>
<startables>
<array>
<item>${data.access}</item>
<item>${web.service}</item>
<item>${etc.etc.etc}</item>
</array>
</startableS>
</parametes>
</component>
Then call the STarterService.Start() in your code, which will iterate on
the array and start everything.
Do not register the Startable facility.
This allows you to control the exact order that the components will start.
I am using a similar approach (although not for controlling starting order)
in order to group actions into action sets.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of
> Shawn Hinsey
> Sent: Tuesday, July 18, 2006 10:06 PM
> To: [email protected]
> Subject: Re: [Castle-users] Static dependencies [was Re: Startable
> facility]
>
> I think I just won't use IStartable ;)
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]] On Behalf
> > Of hammett
> > Sent: Tuesday, July 18, 2006 3:59 PM
> > To: [email protected]
> > Subject: Re: [Castle-users] Static dependencies [was Re:
> > Startable facility]
> >
> > I think Shawn is considering Windsor a little bit nondeterministic,
> in
> > which he's wrong, although at some point in its existence the Kernel
> > screw up the order of components.. this was fixed.
> >
> > Shawn, fast solution: register you startable component as the last
> > component (and make sure you're using a version from the latest
> build)
> >
> > Long solution: well, that would require some thinking, can't do it
> > right now.
> >
> > On 7/18/06, Ayende Rahien <[EMAIL PROTECTED]> wrote:
> > > Why not? Because it was not registered yet?
> >
> >
> > --
> > Cheers,
> > hammett
> > http://hammett.castleproject.org/
> >
> > --------------------------------------------------------------
> > -----------
> > Take Surveys. Earn Cash. Influence the Future of IT Join
> > SourceForge.net's Techsay panel and you'll get the chance to share
> > your opinions on IT & business topics through brief surveys -- and
> > earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge
> > &CID=DEVDEV
> > _______________________________________________
> > CastleProject-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/castleproject-users
> >
>
> -----------------------------------------------------------------------
> --
> Take Surveys. Earn Cash. Influence the Future of IT Join
> SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
> EV
> _______________________________________________
> CastleProject-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/castleproject-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
CastleProject-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/castleproject-users
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ CastleProject-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/castleproject-users
