/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. <beans xmlns="http://www.springframework.org/schema/beans"
  18. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  19. xmlns:p="http://www.springframework.org/schema/p"
  20. xmlns:hz="http://www.hazelcast.com/schema/spring"
  21. xsi:schemaLocation="http://www.springframework.org/schema/beans
  22. http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  23. http://www.hazelcast.com/schema/spring
  24. http://www.hazelcast.com/schema/spring/hazelcast-spring-2.5.xsd">
  25. <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
  26. p:systemPropertiesModeName="SYSTEM_PROPERTIES_MODE_OVERRIDE">
  27. <property name="locations">
  28. <list>
  29. <value>classpath:/hazelcast-default.properties</value>
  30. </list>
  31. </property>
  32. </bean>
  33. <hz:hazelcast id="instance">
  34. <hz:config>
  35. <hz:group
  36. name="${cluster.group.name}"
  37. password="${cluster.group.password}"/>
  38. <hz:properties>
  39. <hz:property name="hazelcast.merge.first.run.delay.seconds">5</hz:property>
  40. <hz:property name="hazelcast.merge.next.run.delay.seconds">5</hz:property>
  41. </hz:properties>
  42. <hz:network port="${cluster.port}" port-auto-increment="false">
  43. <hz:join>
  44. <hz:multicast enabled="false"
  45. multicast-group="224.2.2.3"
  46. multicast-port="54327"/>
  47. <hz:tcp-ip enabled="true">
  48. <hz:members>${cluster.members}</hz:members>
  49. </hz:tcp-ip>
  50. </hz:join>
  51. <hz:interfaces enabled="false">
  52. <hz:interface>10.10.1.*</hz:interface>
  53. </hz:interfaces>
  54. </hz:network>
  55. </hz:config>
  56. </hz:hazelcast>
  57. <hz:client id="client"
  58. group-name="${cluster.group.name}" group-password="${cluster.group.password}"
  59. connect-attempt-limit="3" connect-timeout="1000"
  60. reconnect-attempt-limit="2" reconnect-timeout="3000"
  61. auto-update-members="false" shuffle-members="true">
  62. <hz:member>127.0.0.1:5700</hz:member>
  63. <hz:member>127.0.0.1:5701</hz:member>
  64. </hz:client>
  65. <hz:client id="client2"
  66. connect-attempt-limit="3" connect-timeout="1000"
  67. reconnect-attempt-limit="2" reconnect-timeout="3000"
  68. auto-update-members="false" shuffle-members="true" credentials-ref="credentials" >
  69. <hz:member>127.0.0.1:5700</hz:member>
  70. <hz:member>127.0.0.1:5701</hz:member>
  71. </hz:client>
  72. <bean id="credentials" class="com.hazelcast.security.UsernamePasswordCredentials">
  73. <property name="username" value="spring-group" />
  74. <property name="password" value="spring-group-pass" />
  75. </bean>
  76. <hz:map id="map1" instance-ref="client" name="map1"/>
  77. <hz:map id="map2" instance-ref="client" name="map2"/>
  78. <hz:multiMap id="multiMap" instance-ref="client" name="multiMap"/>
  79. <hz:queue id="queue" instance-ref="client" name="queue"/>
  80. <hz:topic id="topic" instance-ref="client" name="topic"/>
  81. <hz:set id="set" instance-ref="client" name="set"/>
  82. <hz:list id="list" instance-ref="client" name="list"/>
  83. <hz:executorService id="executorService" instance-ref="client" name="executorService"/>
  84. <hz:idGenerator id="idGenerator" instance-ref="client" name="idGenerator"/>
  85. <hz:atomicNumber id="atomicNumber" instance-ref="client" name="atomicNumber"/>
  86. <hz:countDownLatch id="countDownLatch" instance-ref="client" name="countDownLatch"/>
  87. <hz:semaphore id="semaphore" instance-ref="client" name="semaphore"/>
  88. </beans>