PageRenderTime 28ms CodeModel.GetById 15ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/hazelcast-spring/src/test/resources/com/hazelcast/spring/node-client-applicationContext-hazelcast.xml

https://bitbucket.org/gabral6_gmailcom/hazelcast
XML | 96 lines | 73 code | 8 blank | 15 comment | 0 complexity | 39a0598c876b8eb359d4a1fe6204d44b MD5 | raw file
 1<?xml version="1.0" encoding="UTF-8"?>
 2<!--
 3  ~ Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
 4  ~
 5  ~ Licensed under the Apache License, Version 2.0 (the "License");
 6  ~ you may not use this file except in compliance with the License.
 7  ~ You may obtain a copy of the License at
 8  ~
 9  ~ http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17
18<beans xmlns="http://www.springframework.org/schema/beans"
19       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20       xmlns:p="http://www.springframework.org/schema/p"
21       xmlns:hz="http://www.hazelcast.com/schema/spring"
22       xsi:schemaLocation="http://www.springframework.org/schema/beans
23		http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
24		http://www.hazelcast.com/schema/spring
25		http://www.hazelcast.com/schema/spring/hazelcast-spring-2.5.xsd">
26
27    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
28          p:systemPropertiesModeName="SYSTEM_PROPERTIES_MODE_OVERRIDE">
29        <property name="locations">
30            <list>
31                <value>classpath:/hazelcast-default.properties</value>
32            </list>
33        </property>
34    </bean>
35
36    <hz:hazelcast id="instance">
37        <hz:config>
38            <hz:group
39                    name="${cluster.group.name}"
40                    password="${cluster.group.password}"/>
41            <hz:properties>
42                <hz:property name="hazelcast.merge.first.run.delay.seconds">5</hz:property>
43                <hz:property name="hazelcast.merge.next.run.delay.seconds">5</hz:property>
44            </hz:properties>
45            <hz:network port="${cluster.port}" port-auto-increment="false">
46                <hz:join>
47                    <hz:multicast enabled="false"
48                                  multicast-group="224.2.2.3"
49                                  multicast-port="54327"/>
50                    <hz:tcp-ip enabled="true">
51                        <hz:members>${cluster.members}</hz:members>
52                    </hz:tcp-ip>
53                </hz:join>
54                <hz:interfaces enabled="false">
55                    <hz:interface>10.10.1.*</hz:interface>
56                </hz:interfaces>
57            </hz:network>
58        </hz:config>
59    </hz:hazelcast>
60
61    <hz:client id="client"
62        group-name="${cluster.group.name}" group-password="${cluster.group.password}"
63        connect-attempt-limit="3" connect-timeout="1000"
64        reconnect-attempt-limit="2" reconnect-timeout="3000"
65        auto-update-members="false" shuffle-members="true">
66        <hz:member>127.0.0.1:5700</hz:member>
67        <hz:member>127.0.0.1:5701</hz:member>
68    </hz:client>
69
70    <hz:client id="client2"
71               connect-attempt-limit="3" connect-timeout="1000"
72               reconnect-attempt-limit="2" reconnect-timeout="3000"
73               auto-update-members="false" shuffle-members="true" credentials-ref="credentials" >
74        <hz:member>127.0.0.1:5700</hz:member>
75        <hz:member>127.0.0.1:5701</hz:member>
76    </hz:client>
77
78    <bean id="credentials" class="com.hazelcast.security.UsernamePasswordCredentials">
79        <property name="username" value="spring-group" />
80        <property name="password" value="spring-group-pass" />
81    </bean>
82
83    <hz:map id="map1" instance-ref="client" name="map1"/>
84    <hz:map id="map2" instance-ref="client" name="map2"/>
85    <hz:multiMap id="multiMap" instance-ref="client" name="multiMap"/>
86    <hz:queue id="queue" instance-ref="client" name="queue"/>
87    <hz:topic id="topic" instance-ref="client" name="topic"/>
88    <hz:set id="set" instance-ref="client" name="set"/>
89    <hz:list id="list" instance-ref="client" name="list"/>
90    <hz:executorService id="executorService" instance-ref="client" name="executorService"/>
91    <hz:idGenerator id="idGenerator" instance-ref="client" name="idGenerator"/>
92    <hz:atomicNumber id="atomicNumber" instance-ref="client" name="atomicNumber"/>
93    <hz:countDownLatch id="countDownLatch" instance-ref="client" name="countDownLatch"/>
94    <hz:semaphore id="semaphore" instance-ref="client" name="semaphore"/>
95
96</beans>