-
Notifications
You must be signed in to change notification settings - Fork 477
/
common-test-context.xml
87 lines (67 loc) · 4.94 KB
/
common-test-context.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2014-2016 CyberVision, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:task="http://www.springframework.org/schema/task" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
<aop:aspectj-autoproxy />
<context:component-scan base-package="org.kaaproject.kaa.server.node, org.kaaproject.kaa.server.control" />
<import resource="classpath:/dao/mongo-dao-test-context.xml" />
<util:properties id="properties"
location="classpath:/control/control-server-test.properties" />
<bean id="kaaNodeServerConfig" class="org.kaaproject.kaa.server.node.service.config.KaaNodeServerConfig">
<property name="controlServiceEnabled" value="#{properties[control_service_enabled]}" />
<property name="bootstrapServiceEnabled" value="#{properties[bootstrap_service_enabled]}" />
<property name="operationsServiceEnabled" value="#{properties[operations_service_enabled]}" />
<property name="thriftHost" value="#{properties[thrift_host]}" />
<property name="thriftPort" value="#{properties[thrift_port]}" />
<property name="zkEnabled" value="#{properties[zk_enabled]}" />
<property name="zkHostPortList" value="#{properties[zk_host_port_list]}" />
<property name="zkWaitConnectionTime" value="#{properties[zk_wait_connection_time]}" />
<property name="zkMaxRetryTime" value="#{properties[zk_max_retry_time]}" />
<property name="zkSleepTime" value="#{properties[zk_sleep_time]}" />
<property name="zkIgnoreErrors" value="#{properties[zk_ignore_errors]}" />
</bean>
<!--Zookeeper client configuration-->
<bean id="zkRetryPolicy" class="org.apache.curator.retry.RetryUntilElapsed">
<constructor-arg name="maxElapsedTimeMs" value="#{properties[zk_max_retry_time]}"/>
<constructor-arg name="sleepMsBetweenRetries" value="#{properties[zk_sleep_time]}"/>
</bean>
<bean id="zkClient" class="org.apache.curator.framework.CuratorFrameworkFactory" factory-method="newClient">
<constructor-arg name="connectString" value="#{properties[zk_host_port_list]}"/>
<constructor-arg name="sessionTimeoutMs" value="60000"/>
<constructor-arg name="connectionTimeoutMs" value="3000"/>
<constructor-arg name="retryPolicy" ref="zkRetryPolicy"/>
</bean>
<!-- Kaa Node Service -->
<bean id="kaaNodeInitializationService"
class="org.kaaproject.kaa.server.node.service.initialization.KaaNodeInitializationService" />
<bean id="controlInitializationService"
class="org.kaaproject.kaa.server.control.service.initialization.ControlInitializationService" />
<bean id="controlService" class="org.kaaproject.kaa.server.control.service.DefaultControlService" />
<!-- EHCACHE -->
<bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:config-location="ehcache.xml" />
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cache-manager-ref="ehcache" />
</beans>