Sorry, docs are out of date (in process of being updated).  You don't need
to do anything besides register facility

On Fri, Feb 12, 2010 at 10:04 AM, Mark Seemann <[email protected]> wrote:

> As far as I understand the Windsor WCF Facility, it requires me to
> invoke the static WindsorServiceHostFactory.RegisterContainer method
> from within Application_Start in a Global.asax(.cs?) file. I'm
> referring to this documentation:
> http://www.castleproject.org/container/facilities/trunk/wcf/index.html
>
> I find this... not as nice as it could be.
>
> It smells of ASP.NET, of which I'm not a particularly big fan, but it
> also makes me uneasy because I've never seen the combination of
> Global.asax and WCF before. Does it require me to turn on ASP.NET
> Compatibility mode before it will work?
>
> This may simply be a severe case of FUD on my part, but I would
> appreciate a cleaner API.
>
> May I suggest something like this:
>
> public abstract class WindsorServiceHostFactory : ServiceHostFactory
> {
>   // ... other members
>
>    protected abstract IWindsorContainer CreateContainer();
> }
>
> This is basically just a ServiceHostFactory with a Template Method.
> All I would need to do to wire up my own service would be to derive
> from this class and implement the CreateContainer method. Registering
> this derived ServiceHostFactory in my .svc file would enable Windsor
> to wire up my service.
>
> This approach requires me to edit/create the same number of files (2)
> as the current approach, but has the added benefit that it will also
> work outside of IIS, since I could simply use the derived
> ServiceHostFactory directly to spin up a new service.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected]
> .
> To unsubscribe from this group, send email to
> [email protected]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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-users?hl=en.

Reply via email to