Esempio n. 1
0
        public void Start()
        {
            var container = new WindsorContainer(new XmlInterpreter());
            container.Kernel.AddFacility("rhino.esb.loadbalancer", new LoadBalancerFacility());

            loadBalancer = container.Resolve<MsmqLoadBalancer>();
            log4net.GlobalContext.Properties["BusName"] = loadBalancer.Endpoint.Uri.AbsolutePath;
            loadBalancer.Start();
        }
Esempio n. 2
0
        public void Start()
        {
            var container = new WindsorContainer(new XmlInterpreter());

            container.Kernel.AddFacility("rhino.esb.loadbalancer", new LoadBalancerFacility());

            loadBalancer = container.Resolve <MsmqLoadBalancer>();
            log4net.GlobalContext.Properties["BusName"] = loadBalancer.Endpoint.Uri.AbsolutePath;
            loadBalancer.Start();
        }
Esempio n. 3
0
        public void RegisterPrimaryLoadBalancer()
        {
            var loadBalancerConfig = (LoadBalancerConfiguration) config;

            applicationContext.RegisterSingleton(() =>
                {
                    MsmqLoadBalancer balancer = new MsmqLoadBalancer(applicationContext.Get<IMessageSerializer>(),
                                                                            applicationContext.Get<IQueueStrategy>(),
                                                                            applicationContext.Get<IEndpointRouter>(),
                                                                            loadBalancerConfig.Endpoint,
                                                                            loadBalancerConfig.ThreadCount,
                                                                            loadBalancerConfig.Transactional,
                                                                            applicationContext.Get<IMessageBuilder<Message>>());
                    balancer.ReadyForWorkListener = applicationContext.Get<MsmqReadyForWorkListener>();
                    return balancer;
                });

            applicationContext.RegisterSingleton<IDeploymentAction>(() => new CreateLoadBalancerQueuesAction(applicationContext.Get<IQueueStrategy>(), applicationContext.Get<MsmqLoadBalancer>()));
        }
 public CreateLoadBalancerQueuesAction(IQueueStrategy queueStrategy, MsmqLoadBalancer loadBalancer)
     : base(queueStrategy)
 {
     this.loadBalancer = loadBalancer;
 }
 public CreateLoadBalancerQueuesAction(IQueueStrategy queueStrategy, MsmqLoadBalancer loadBalancer)
 {
     this.queueStrategy = queueStrategy;
     this.loadBalancer = loadBalancer;
 }