All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spring.otter-arbitrate-common.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:lang="http://www.springframework.org/schema/lang" xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
           http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"
    default-autowire="byName" >
	
	<!-- 初始化一下ArbitrateFactory,注入spring容器 -->
	<bean name="arbitrateFactory" class="com.alibaba.otter.shared.arbitrate.impl.setl.ArbitrateFactory" lazy-init="false" scope="singleton"/>
	
	<!-- zookeeper -->
	<bean name="zookeeperClient" class="com.alibaba.otter.shared.arbitrate.impl.zookeeper.ZooKeeperClient" depends-on="arbitrateFactory" lazy-init="false" scope="singleton">
		<property name="cluster" value="${otter.zookeeper.cluster.default:127.0.0.1:2181}" />
		<property name="sessionTimeout" value="${otter.zookeeper.sessionTimeout:60000}" />
	</bean>
	
	<bean id="arbitrateExecutor" class="com.alibaba.otter.shared.common.utils.thread.ExecutorServiceFactoryBean">
		<property name="poolSize" value="20" />
		<property name="acceptCount" value="40" />
		<property name="name" value="Otter-Arbitrate-Executor" />
	</bean>
	
	<bean id="nodeMonitor" class="com.alibaba.otter.shared.arbitrate.impl.setl.monitor.NodeMonitor" scope="singleton">
	</bean>
</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy