| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You 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. |
| --> |
| |
| <!-- |
| Ignite Spring configuration file to startup grid. |
| --> |
| <beans xmlns="http://www.springframework.org/schema/beans" |
| xmlns:util="http://www.springframework.org/schema/util" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://www.springframework.org/schema/beans |
| http://www.springframework.org/schema/beans/spring-beans.xsd |
| http://www.springframework.org/schema/util |
| http://www.springframework.org/schema/util/spring-util.xsd"> |
| <!-- |
| Store data source. |
| --> |
| <bean id="storeDataSource" class="org.h2.jdbcx.JdbcDataSource"> |
| <property name="url" value="jdbc:h2:tcp://localhost/store-benchmark/h2-benchmark"/> |
| <property name="user" value="sa"/> |
| </bean> |
| |
| <bean id="sampleTypeMetadata" class="org.apache.ignite.cache.store.jdbc.JdbcType"> |
| <property name="databaseTable" value="SAMPLE"/> |
| <property name="keyType" value="org.apache.ignite.yardstick.cache.model.SampleKey"/> |
| <property name="keyFields"> |
| <list> |
| <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> |
| <property name="databaseFieldType"> |
| <util:constant static-field="java.sql.Types.INTEGER"/> |
| </property> |
| <property name="databaseFieldName" value="ID"/> |
| <property name="javaFieldType" value="int"/> |
| <property name="javaFieldName" value="id"/> |
| </bean> |
| </list> |
| </property> |
| <property name="valueType" value="org.apache.ignite.yardstick.cache.model.SampleValue"/> |
| <property name="valueFields"> |
| <list> |
| <bean class="org.apache.ignite.cache.store.jdbc.JdbcTypeField"> |
| <property name="databaseFieldType"> |
| <util:constant static-field="java.sql.Types.INTEGER"/> |
| </property> |
| <property name="databaseFieldName" value="VALUE"/> |
| <property name="javaFieldType" value="int"/> |
| <property name="javaFieldName" value="id"/> |
| </bean> |
| </list> |
| </property> |
| </bean> |
| |
| <bean class="org.apache.ignite.configuration.IgniteConfiguration"> |
| <property name="peerClassLoadingEnabled" value="false"/> |
| |
| <property name="cacheConfiguration"> |
| <list> |
| <bean class="org.apache.ignite.configuration.CacheConfiguration"> |
| <property name="name" value="atomic"/> |
| |
| <property name="cacheMode" value="PARTITIONED"/> |
| |
| <property name="atomicityMode" value="ATOMIC"/> |
| |
| <property name="cacheStoreFactory"> |
| <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory"> |
| <property name="dataSourceBean" value="storeDataSource"/> |
| <property name="dialect"> |
| <bean class="org.apache.ignite.cache.store.jdbc.dialect.H2Dialect"/> |
| </property> |
| <property name="types"> |
| <list> |
| <bean parent="sampleTypeMetadata"> |
| <property name="cacheName" value="atomic"/> |
| </bean> |
| </list> |
| </property> |
| </bean> |
| </property> |
| </bean> |
| |
| <bean class="org.apache.ignite.configuration.CacheConfiguration"> |
| <property name="name" value="tx"/> |
| |
| <property name="cacheMode" value="PARTITIONED"/> |
| |
| <property name="atomicityMode" value="TRANSACTIONAL"/> |
| |
| <property name="swapEnabled" value="false"/> |
| |
| <property name="cacheStoreFactory"> |
| <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory"> |
| <property name="dataSourceBean" value="storeDataSource"/> |
| <property name="dialect"> |
| <bean class="org.apache.ignite.cache.store.jdbc.dialect.H2Dialect"/> |
| </property> |
| <property name="types"> |
| <list> |
| <bean parent="sampleTypeMetadata"> |
| <property name="cacheName" value="tx"/> |
| </bean> |
| </list> |
| </property> |
| </bean> |
| </property> |
| </bean> |
| </list> |
| </property> |
| |
| <property name="connectorConfiguration"> |
| <null/> |
| </property> |
| |
| <property name="includeEventTypes"> |
| <list/> |
| </property> |
| |
| <property name="loadBalancingSpi"> |
| <bean class="org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi"> |
| <property name="perTask" value="false"/> |
| </bean> |
| </property> |
| |
| <property name="localHost" value="127.0.0.1"/> |
| |
| <property name="discoverySpi"> |
| <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> |
| <property name="ipFinder"> |
| <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> |
| <property name="addresses"> |
| <list> |
| <value>127.0.0.1:47500</value> |
| <value>127.0.0.1:47501</value> |
| <value>127.0.0.1:47502</value> |
| <value>127.0.0.1:47503</value> |
| <value>127.0.0.1:47504</value> |
| <value>127.0.0.1:47505</value> |
| <value>127.0.0.1:47506</value> |
| <value>127.0.0.1:47507</value> |
| <value>127.0.0.1:47508</value> |
| <value>127.0.0.1:47509</value> |
| </list> |
| </property> |
| </bean> |
| </property> |
| </bean> |
| </property> |
| </bean> |
| </beans> |