A: 

How about doing it this way? http://weblogs.asp.net/cibrax/archive/2007/12/13/wcf-dependency-injection-behavior.aspx

Approach is about implementing an Iinstanceprovider

http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.iinstanceprovider.aspx

stackunderflow
Thanks for the response but the extension of IInstanceProvider , IServiceBehavior and the service host factory is already taken care by the WCF Facility. In fact I have mention that in my .svc file that how the service factory will be created using this line <%@ ServiceHost Language="C#" Service="BookingService" Factory="Castle.Facilities.WcfIntegration.DefaultServiceHostFactory, Castle.Facilities.WcfIntegration" %> and end to end it's working it is that the container is in global.asax.cs file and how do i refer the container back in code .
Paul Graham
A: 

You can have a dependency on IKernel, it's automatically provided by Windsor.

 public BookingBll(IKernel kernel, IBookingRepository repository) {}

If you really, really need IWindsorContainer you can register it in the container , self-registration if you wish :-)

SystemContainer.Register(Component.For<IWindsorContainer>.Instance(SystemContainer));

Then your ctor will become:

public BookingBll(IWindsorContainer container, IBookingRepository repository) {}

It's generally frowned upon to take a dependency on the container/kernel, better to inject the components you need as it will make your dependencies much clearer and your code testable. Taking a container dependency is like making Global.SystemContainer 'public static' and reference it from everywhere in your app.

In your example, the ILogger (if it's Castle.Core.ILogger) can be injected by the LoggingFacility, no need to resolve it yourself.

roelofb