ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [2/2] ignite git commit: IGNITE-2429: Added example.
Date Wed, 16 Mar 2016 10:18:11 GMT
IGNITE-2429: Added example.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d208e44b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d208e44b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d208e44b

Branch: refs/heads/ignite-1786
Commit: d208e44be2532be2bd151c701765886d784d0fab
Parents: f55b2db
Author: isapego <isapego@gridgain.com>
Authored: Wed Mar 16 13:17:59 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Mar 16 13:17:59 2016 +0300

----------------------------------------------------------------------
 assembly/release-fabric-base.xml                |  12 +
 modules/platforms/cpp/DEVNOTES.txt              |  46 ++-
 modules/platforms/cpp/README.txt                |  25 +-
 modules/platforms/cpp/cpp.dxg                   |   6 +-
 modules/platforms/cpp/examples/Makefile.am      |  39 ---
 modules/platforms/cpp/examples/README.txt       |   9 +-
 .../cpp/examples/config/example-cache.xml       |  77 -----
 modules/platforms/cpp/examples/configure.ac     |  38 ---
 .../platforms/cpp/examples/include/Makefile.am  |  21 --
 .../examples/include/ignite/examples/address.h  |  17 +-
 .../include/ignite/examples/organization.h      |  15 +-
 .../examples/include/ignite/examples/person.h   | 110 +++++++
 .../cpp/examples/odbc-example/Makefile.am       |  39 +++
 .../odbc-example/config/example-odbc.xml        | 108 +++++++
 .../cpp/examples/odbc-example/configure.ac      |  38 +++
 .../project/vs/odbc-example.vcxproj             | 108 +++++++
 .../project/vs/odbc-example.vcxproj.filters     |  28 ++
 .../examples/odbc-example/src/odbc_example.cpp  | 286 +++++++++++++++++++
 .../cpp/examples/project/vs/ignite-examples.sln |  15 +-
 .../examples/project/vs/ignite-examples.vcxproj | 107 -------
 .../project/vs/ignite-examples.vcxproj.filters  |  30 --
 .../cpp/examples/putget-example/Makefile.am     |  39 +++
 .../putget-example/config/example-cache.xml     |  75 +++++
 .../cpp/examples/putget-example/configure.ac    |  55 ++++
 .../project/vs/putget-example.vcxproj           | 107 +++++++
 .../project/vs/putget-example.vcxproj.filters   |  30 ++
 .../putget-example/src/putget_example.cpp       | 126 ++++++++
 .../cpp/examples/src/putgetexample.cpp          | 126 --------
 modules/platforms/cpp/odbc-test/Makefile.am     |  35 +--
 modules/platforms/cpp/odbc/Makefile.am          |   2 +
 modules/platforms/cpp/odbc/README.txt           |  88 ++++++
 .../cpp/odbc/install/ignite-odbc-install.ini    |   5 +
 .../cpp/odbc/install/install_amd64.cmd          |  29 ++
 .../platforms/cpp/odbc/install/install_x86.cmd  |  16 ++
 .../platforms/cpp/odbc/project/vs/odbc.vcxproj  |   8 +-
 modules/platforms/cpp/odbc/src/environment.cpp  |   4 +-
 .../platforms/cpp/odbc/src/query/data_query.cpp |  16 +-
 modules/platforms/cpp/project/vs/ignite.slnrel  |  10 +
 .../platforms/cpp/project/vs/ignite_x86.slnrel  |  10 +
 39 files changed, 1448 insertions(+), 507 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/assembly/release-fabric-base.xml
----------------------------------------------------------------------
diff --git a/assembly/release-fabric-base.xml b/assembly/release-fabric-base.xml
index 9f9d310..209634f 100644
--- a/assembly/release-fabric-base.xml
+++ b/assembly/release-fabric-base.xml
@@ -132,6 +132,18 @@
             <outputDirectory>/platforms/cpp/examples</outputDirectory>
         </fileSet>
 
+        <!-- Move CPP "odbc" module. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/odbc</directory>
+            <outputDirectory>/platforms/cpp/odbc</outputDirectory>
+        </fileSet>
+
+        <!-- Move CPP "binary" module. -->
+        <fileSet>
+            <directory>modules/platforms/cpp/binary</directory>
+            <outputDirectory>/platforms/cpp/binary</outputDirectory>
+        </fileSet>
+
         <!-- Move CPP licenses. -->
         <fileSet>
             <directory>modules/platforms/licenses</directory>

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/DEVNOTES.txt b/modules/platforms/cpp/DEVNOTES.txt
index 9a09333..8476930 100644
--- a/modules/platforms/cpp/DEVNOTES.txt
+++ b/modules/platforms/cpp/DEVNOTES.txt
@@ -1,5 +1,9 @@
 Apache Ignite C++ Build Instructions
 ====================================
+Here you can find instruction on how to build Apache Ignite C++ core library and
+stand-alone node binary. To build examples you need to build and install core Apache
+Ignite library then refer to $IGNITE_HOME/platforms/cpp/example/README.txt for 
+futher instructions.
 
 Building on Linux With Autotools
 ----------------------------------
@@ -9,8 +13,11 @@ Common Requirements:
  * GCC, g++, autotools, automake, and libtool must be installed
  * Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp
  * JAVA_HOME environment variable must be set pointing to Java installation directory.
+ * IGNITE_HOME environment variable must be set to Ignite installation directory.
+ * To build ODBC driver you need to install ODBC Driver Manager on you system. 
+   Apache Ignite has been tested with UnixODBC.
 
-Building the library:
+Building the Apache Ignite C++ components:
 
  * Build Apache Ignite C++ helper "common" library:
      * Navigate to the directory $IGNITE_HOME/platforms/cpp/common
@@ -23,6 +30,17 @@ Building the library:
          * ./configure
          * make
          * make install
+ * Build Apache Ignite C++ "binary" library:
+     * Navigate to the directory $IGNITE_HOME/platforms/cpp/binary
+     * Execute the following commands one by one:
+         * libtoolize
+         * aclocal
+         * autoheader
+         * automake --add-missing
+         * autoreconf
+         * ./configure
+         * make
+         * make install
  * Build Apache Ignite C++ library:
      * Navigate to the directory $IGNITE_HOME/platforms/cpp/core
      * Execute the following commands one by one:
@@ -34,6 +52,27 @@ Building the library:
          * ./configure
          * make
          * make install
+ * Build Apache Ignite C++ stand-alone node binary:
+     * Navigate to the directory $IGNITE_HOME/platforms/cpp/ignite
+     * Execute the following commands one by one:
+         * libtoolize
+         * aclocal
+         * autoheader
+         * automake --add-missing
+         * autoreconf
+         * ./configure
+         * make
+ * Build Apache Ignite ODBC driver:
+     * Navigate to the directory $IGNITE_HOME/platforms/cpp/odbc
+     * Execute the following commands one by one:
+         * libtoolize
+         * aclocal
+         * autoheader
+         * automake --add-missing
+         * autoreconf
+         * ./configure
+         * make
+         * make install
 
 NOTE: "make install" command may require superuser privileges. In this case it must be
 executed as "sudo make install".
@@ -47,11 +86,12 @@ Common Requirements:
  * Windows SDK 7.1
  * Java Development Kit (JDK) must be installed: https://java.com/en/download/index.jsp
  * JAVA_HOME environment variable must be set pointing to Java installation directory.
+ * IGNITE_HOME environment variable must be set to Ignite installation directory.
 
 Building binaries:
 
- * Open and build %IGNITE_HOME%\platforms\cpp\project\vs\ignite.sln (or ignite_86.sln if you are running
-   32-bit platform).
+ * Open and build %IGNITE_HOME%\platforms\cpp\project\vs\ignite.sln (or ignite_86.sln if
+   you are running 32-bit platform).
 
 Building in later versions of Visual Studio:
  * Open project\vs\ignite.sln or project\vs\ignite_86.sln in Visual Studio

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/README.txt
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/README.txt b/modules/platforms/cpp/README.txt
index e542c82..17d1cf2 100644
--- a/modules/platforms/cpp/README.txt
+++ b/modules/platforms/cpp/README.txt
@@ -12,11 +12,12 @@ Support for the following will be added in next releases:
  * ACID transactions management.
  * Distributed locks.
  * Async operations.
- * Cache SQL queries and continuous queries.
+ * Cache SQL continuous queries.
  * Event listening.
  * Compute grid functionality.
 
 Full source code is provided. Users should build the library for intended platform.
+For build instructions please refer to DEVNOTES.txt.
 
 Linux info
 ==============
@@ -25,6 +26,7 @@ Files list:
 
  * ignite - executable to start standalone Ignite C++ node.
  * libignite.so - Ignite C++ API library.
+ * libignite-odbc.so - Ignite ODBC driver.
  
 Development:
 
@@ -34,9 +36,10 @@ Development:
  * Apache Ignite C++ depends on jni.h file located inside ${JAVA_HOME}/include directory.
    Add this directory to headers search path: "-I${JAVA_HOME}/include".
  * Library is placed in the "/usr/local/lib" directory. Link it to your project: "-lignite".
- * Ignite depends on "libjvm.so" library shipped with Java. Typically this library is located inside
-   $JAVA_HOME/jre/lib/amd64/server directory. Ensure that LD_LIBRARY_PATH environment variable points to this directory.
- * To start Apache Ignite as a standalone node or Windows service use ignite
+ * Ignite depends on "libjvm.so" library shipped with Java. Typically this library is
+   located inside $JAVA_HOME/jre/lib/amd64/server directory. Ensure that LD_LIBRARY_PATH
+   environment variable points to this directory.
+ * To start Apache Ignite as a standalone node use "ignite" binary.
 
  
 Windows info
@@ -46,22 +49,26 @@ Files list:
 
  * ignite.exe - executable to start standalone Ignite C++ node.
  * ignite.core.dll - Ignite C++ API library.
+ * odbc.dll - Ignite ODBC driver.
  
 Development:
 
  * IGNITE_HOME environment variable must be set to Ignite installation directory.
  * Update Include Directories in Project Properties with paths to:
-   * $(IGNITE_HOME)\platforms\cpp\core\include
-   * $(IGNITE_HOME)\platforms\cpp\core\os\win\include
    * $(IGNITE_HOME)\platforms\cpp\common\include
    * $(IGNITE_HOME)\platforms\cpp\common\os\win\include
+   * $(IGNITE_HOME)\platforms\cpp\binary\include
+   * $(IGNITE_HOME)\platforms\cpp\core\include
+   * $(IGNITE_HOME)\platforms\cpp\core\os\win\include
    * $(JAVA_HOME)\include
    * $(JAVA_HOME)\include\win32
  * Update Library Directories with path to the built binaries
  * Update Linker\Input\Additional Dependencies in Project Properties with path to
    * ignite.common.lib
+   * ignite.binary.lib
    * ignite.core.lib
- * Make sure that your application is aware about ignite.common.dll and ignite.core.dll libraries. The easiest way
-   to achieve this is to either make sure these files are in %PATH%, or to put them into the output directory of
-   your project with help of PostBuild events.
+ * Make sure that your application is aware about ignite.common.dll and ignite.core.dll
+   libraries. The easiest way to achieve this is to either make sure these files are in
+   %PATH%, or to put them into the output directory of your project with help of
+   PostBuild events.
  * To start Apache Ignite as a standalone node or Windows service use ignite.exe
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/cpp.dxg
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/cpp.dxg b/modules/platforms/cpp/cpp.dxg
index 42b0a36..605a613 100644
--- a/modules/platforms/cpp/cpp.dxg
+++ b/modules/platforms/cpp/cpp.dxg
@@ -1715,8 +1715,8 @@ GENERATE_LEGEND        = YES
 
 DOT_CLEANUP            = YES
 
-;INPUT=core
-;EXCLUDE=core/include/ignite/impl core/os/linux/include/ignite/impl core/os/linux/src/impl core/os/win/include/ignite/impl core/os/win/src/impl core/src/impl
-;STRIP_FROM_PATH=core/include/ignite core/src
+;INPUT=core binary
+;EXCLUDE=core/include/ignite/impl core/os/linux/include/ignite/impl core/os/linux/src/impl core/os/win/include/ignite/impl core/os/win/src/impl core/src/impl binary/include/ignite/impl binary/src/impl
+;STRIP_FROM_PATH=core/include/ignite core/src binary/include/ignite binary/src
 ;OUTPUT_DIRECTORY=../../clients/target/cppdoc
 ;PROJECT_LOGO=../../../assembly/docfiles/ignite_logo.png

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/Makefile.am b/modules/platforms/cpp/examples/Makefile.am
deleted file mode 100644
index d99cd82..0000000
--- a/modules/platforms/cpp/examples/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-##
-## 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.
-##
-
-ACLOCAL_AMFLAGS = "-Im4"
-
-SUBDIRS = .
-DIST_SUBDIRS = . include
-
-AM_CPPFLAGS = -I$(srcdir)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -DIGNITE_IMPL
-AM_CXXFLAGS = -Wall -std=c++0x
-
-noinst_PROGRAMS = ignite-putgetexample
-
-ignite_putgetexample_SOURCES = src/putgetexample.cpp
-
-ignite_putgetexample_LDFLAGS = -static-libtool-libs -L/usr/local/lib -lignite
-
-run-check: check
-	./ignite-putgetexample -p
-
-clean-local: clean-check
-	$(RM) *.gcno *.gcda
-
-clean-check:
-	$(RM) $(ignite_putgetexample_OBJECTS)

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/README.txt
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/README.txt b/modules/platforms/cpp/examples/README.txt
index dafe670..5406ea8 100644
--- a/modules/platforms/cpp/examples/README.txt
+++ b/modules/platforms/cpp/examples/README.txt
@@ -15,7 +15,9 @@ Running examples on Linux
 Prerequisites:
  * GCC, g++, autotools, automake, and libtool must be installed.
 
-To build examples execute the following commands one by one from $IGNITE_HOME/platforms/cpp/examples directory:
+To build any example execute the following commands one by one from example root directory.
+(e.g. to build putget-example you should run these commands from the 
+$IGNITE_HOME/platforms/cpp/examples/putget-example directory):
  * libtoolize
  * aclocal
  * autoheader
@@ -24,12 +26,13 @@ To build examples execute the following commands one by one from $IGNITE_HOME/pl
  * ./configure
  * make
 
-As a result several executables will appear in example's directory.
+As a result executable will appear in example's directory.
 
 Before running examples ensure that:
  * LD_LIBRARY_PATH environment variable is set and pointing to a directory with "libjvm.so" library. Typically this
    library is located in $JAVA_HOME/jre/lib/amd64/server directory.
-
+ * For odbc-example additionaly ODBC Driver Manager must be present and installed on your platform and
+   Apache Ignite ODBC driver must be built and installed according to instructions for your platform.
 
 Running examples on Windows
 ----------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/config/example-cache.xml b/modules/platforms/cpp/examples/config/example-cache.xml
deleted file mode 100644
index a34f672..0000000
--- a/modules/platforms/cpp/examples/config/example-cache.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:util="http://www.springframework.org/schema/util"
-       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">
-    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-        <!-- Set to true to enable distributed class loading for examples, default is false. -->
-        <property name="peerClassLoadingEnabled" value="true"/>
-
-        <property name="cacheConfiguration">
-            <list>
-                <!--
-                    Partitioned cache example configuration with binary objects enabled.
-                    Used in .NET example that is available only in enterprise edition.
-                -->
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="atomicityMode" value="ATOMIC"/>
-                    <property name="backups" value="1"/>
-                </bean>
-
-                <!--
-                    Partitioned cache example configuration.
-                    Used in .NET cache store example that is available only in enterprise edition.
-                -->
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="tx"/>
-                    <property name="atomicityMode" value="TRANSACTIONAL"/>
-                    <property name="backups" value="1"/>
-                </bean>
-            </list>
-        </property>
-
-        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
-        <property name="discoverySpi">
-            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
-                <property name="ipFinder">
-                    <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery.
-                    -->
-                    <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
-                    <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
-                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-                        <property name="addresses">
-                            <list>
-                                <!-- In distributed environment, replace with actual host IP address. -->
-                                <value>127.0.0.1:47500..47501</value>
-                            </list>
-                        </property>
-                    </bean>
-                </property>
-            </bean>
-        </property>
-    </bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/configure.ac b/modules/platforms/cpp/examples/configure.ac
deleted file mode 100644
index f5cf075..0000000
--- a/modules/platforms/cpp/examples/configure.ac
+++ /dev/null
@@ -1,38 +0,0 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.69])
-AC_INIT([Ingnite C++ examples],[1.6.0.8653],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
-AC_CONFIG_SRCDIR(src)
-
-AC_CANONICAL_SYSTEM
-AC_CONFIG_MACRO_DIR([m4])
-AC_LANG([C++])
-
-# Initialize automake
-AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
-AC_CONFIG_HEADER(config.h)
-
-AM_PROG_AR
-
-# Checks for programs.
-GXX="-g -O2"
-
-AC_PROG_CXX
-
-# Initialize Libtool
-LT_INIT
-
-AC_ARG_ENABLE([debug],
- [AS_HELP_STRING([--enable-debug],[enable debug build [default=no]])],
- [],[enable_debug=no])
-
-if test "x$enable_debug" = xyes; then
-    CXXFLAGS="-g -O0"
-else
-    CXXFLAGS="-g -O3"
-fi
-
-AC_CONFIG_FILES(Makefile)
-
-AC_OUTPUT

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/include/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/include/Makefile.am b/modules/platforms/cpp/examples/include/Makefile.am
deleted file mode 100644
index 13a8816..0000000
--- a/modules/platforms/cpp/examples/include/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-##
-## 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.
-##
-
-ACLOCAL_AMFLAGS = "-Im4"
-
-nobase_include_HEADERS = ignite/examples/address.h \
-                         ignite/examples/organization.h

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/include/ignite/examples/address.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/include/ignite/examples/address.h b/modules/platforms/cpp/examples/include/ignite/examples/address.h
index 4440037..149a98a 100644
--- a/modules/platforms/cpp/examples/include/ignite/examples/address.h
+++ b/modules/platforms/cpp/examples/include/ignite/examples/address.h
@@ -26,17 +26,16 @@ namespace ignite
     {
         struct Address 
         {
-            Address()
+            Address() : street(), zip(0)
             {
-                street = "";
-                zip = 0;
+                // No-op.
             }
             
             Address(std::string street, int zip) : street(street), zip(zip) 
             {
                 // No-op.
             }
-            
+
             std::string ToString() 
             {
                 std::ostringstream oss;
@@ -45,10 +44,10 @@ namespace ignite
 
                 return oss.str();
             }
-            
+
             std::string street;
             int zip;
-        };    
+        };
     }
 }
 
@@ -99,11 +98,11 @@ namespace ignite
             {
                 std::string street = reader.ReadString("street");
                 int zip = reader.ReadInt32("zip");
-                
+
                 return ignite::examples::Address(street, zip);
             }
-        };    
-    }    
+        };
+    }
 }
 
 #endif
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/include/ignite/examples/organization.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/include/ignite/examples/organization.h b/modules/platforms/cpp/examples/include/ignite/examples/organization.h
index 8505214..736e600 100644
--- a/modules/platforms/cpp/examples/include/ignite/examples/organization.h
+++ b/modules/platforms/cpp/examples/include/ignite/examples/organization.h
@@ -28,10 +28,9 @@ namespace ignite
     {
         struct Organization 
         {
-            Organization()
+            Organization() : name(), addr()
             {
-                name = "";
-                addr = Address();
+                // No-op.
             }
             
             Organization(std::string name, Address addr) : name(name), addr(addr) 
@@ -47,10 +46,10 @@ namespace ignite
 
                 return oss.str();
             }
-            
+
             std::string name;
             Address addr;
-        };    
+        };
     }
 }
 
@@ -101,11 +100,11 @@ namespace ignite
             {
                 std::string name = reader.ReadString("name");
                 ignite::examples::Address addr = reader.ReadObject<ignite::examples::Address>("addr");
-                                
+
                 return ignite::examples::Organization(name, addr);
             }
-        };    
-    }    
+        };
+    }
 }
 
 #endif
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/include/ignite/examples/person.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/include/ignite/examples/person.h b/modules/platforms/cpp/examples/include/ignite/examples/person.h
new file mode 100644
index 0000000..2c92660
--- /dev/null
+++ b/modules/platforms/cpp/examples/include/ignite/examples/person.h
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+
+#ifndef _IGNITE_EXAMPLES_PERSON
+#define _IGNITE_EXAMPLES_PERSON
+
+#include <string>
+#include <sstream>
+
+#include "ignite/ignite.h"
+#include "ignite/ignition.h"
+
+namespace ignite
+{
+    namespace examples
+    {
+        struct Person
+        {
+            Person() : orgId(0), salary(.0)
+            {
+                // No-op.
+            }
+
+            Person(int64_t orgId, const std::string& firstName,
+                const std::string& lastName, const std::string& resume, double salary) :
+                orgId(orgId),
+                firstName(firstName),
+                lastName(lastName),
+                resume(resume),
+                salary(salary)
+            {
+                // No-op.
+            }
+
+            std::string ToString()
+            {
+                std::ostringstream oss;
+
+                oss << "Person [orgId=" << orgId
+                    << ", lastName=" << lastName
+                    << ", firstName=" << firstName
+                    << ", salary=" << salary
+                    << ", resume=" << resume << ']';
+
+                return oss.str();
+            }
+
+            int64_t orgId;
+            std::string firstName;
+            std::string lastName;
+            std::string resume;
+            double salary;
+        };
+    }
+}
+
+namespace ignite
+{
+    namespace binary
+    {
+        IGNITE_BINARY_TYPE_START(ignite::examples::Person)
+
+            typedef ignite::examples::Person Person;
+
+            IGNITE_BINARY_GET_TYPE_ID_AS_HASH(Person)
+            IGNITE_BINARY_GET_TYPE_NAME_AS_IS(Person)
+            IGNITE_BINARY_GET_FIELD_ID_AS_HASH
+            IGNITE_BINARY_GET_HASH_CODE_ZERO(Person)
+            IGNITE_BINARY_IS_NULL_FALSE(Person)
+            IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(Person)
+
+            void Write(BinaryWriter& writer, ignite::examples::Person obj)
+            {
+                writer.WriteInt64("orgId", obj.orgId);
+                writer.WriteString("firstName", obj.firstName);
+                writer.WriteString("lastName", obj.lastName);
+                writer.WriteString("resume", obj.resume);
+                writer.WriteDouble("salary", obj.salary);
+            }
+
+            ignite::examples::Person Read(BinaryReader& reader)
+            {
+                int64_t orgId = reader.ReadInt64("orgId");
+                std::string firstName = reader.ReadString("firstName");
+                std::string lastName = reader.ReadString("lastName");
+                std::string resume = reader.ReadString("resume");
+                double salary = reader.ReadDouble("salary");
+
+                return ignite::examples::Person(orgId, firstName, lastName, resume, salary);
+            }
+
+        IGNITE_BINARY_TYPE_END
+    }
+};
+
+#endif // _IGNITE_EXAMPLES_PERSON
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/odbc-example/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/odbc-example/Makefile.am b/modules/platforms/cpp/examples/odbc-example/Makefile.am
new file mode 100644
index 0000000..0564423
--- /dev/null
+++ b/modules/platforms/cpp/examples/odbc-example/Makefile.am
@@ -0,0 +1,39 @@
+##
+## 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.
+##
+
+ACLOCAL_AMFLAGS = "-Im4"
+
+SUBDIRS = .
+DIST_SUBDIRS = .
+
+AM_CPPFLAGS = -I$(srcdir)/../include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -DIGNITE_IMPL
+AM_CXXFLAGS = -Wall -std=c++0x
+
+noinst_PROGRAMS = ignite-odbcexample
+
+ignite_odbcexample_SOURCES = src/odbc_example.cpp
+
+ignite_odbcexample_LDFLAGS = -static-libtool-libs -L/usr/local/lib -lodbc
+
+run-check: check
+	./ignite-odbcexample -p
+
+clean-local: clean-check
+	$(RM) *.gcno *.gcda
+
+clean-check:
+	$(RM) $(ignite_odbcexample_OBJECTS)

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml b/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
new file mode 100644
index 0000000..51e67e0
--- /dev/null
+++ b/modules/platforms/cpp/examples/odbc-example/config/example-odbc.xml
@@ -0,0 +1,108 @@
+<?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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       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">
+    <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+
+        <property name="cacheConfiguration">
+            <list>
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+					<property name="name" value="Person"/>
+					<property name="cacheMode" value="PARTITIONED"/>
+					<property name="atomicityMode" value="TRANSACTIONAL"/>
+					<property name="writeSynchronizationMode" value="FULL_SYNC"/>
+			
+					<!-- Configure type metadata to enable queries. -->
+					<property name="typeMetadata">
+						<list>
+							<bean class="org.apache.ignite.cache.CacheTypeMetadata">
+								<property name="keyType" value="java.lang.Long"/>
+								<property name="valueType" value="Person"/>
+								<property name="ascendingFields">
+									<map>
+										<entry key="orgId" value="java.lang.Long"/>
+									</map>
+								</property>
+								<property name="queryFields">
+									<map>
+										<entry key="firstName" value="java.lang.String"/>
+										<entry key="lastName" value="java.lang.String"/>
+										<entry key="resume" value="java.lang.String"/>
+										<entry key="salary" value="java.lang.Double"/>
+									</map>
+								</property>
+							</bean>
+						</list>
+					</property>
+                </bean>
+				
+				<bean class="org.apache.ignite.configuration.CacheConfiguration">
+					<property name="name" value="Organization"/>
+					<property name="cacheMode" value="PARTITIONED"/>
+					<property name="atomicityMode" value="TRANSACTIONAL"/>
+					<property name="writeSynchronizationMode" value="FULL_SYNC"/>
+			
+					<!-- Configure type metadata to enable queries. -->
+					<property name="typeMetadata">
+						<list>
+							<bean class="org.apache.ignite.cache.CacheTypeMetadata">
+								<property name="keyType" value="java.lang.Long"/>
+								<property name="valueType" value="Organization"/>
+								<property name="ascendingFields">
+									<map>
+										<entry key="name" value="java.lang.String"/>
+									</map>
+								</property>
+							</bean>
+						</list>
+					</property>
+                </bean>
+			</list>
+        </property>
+
+        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <property name="ipFinder">
+                    <!--
+                        Ignite provides several options for automatic discovery that can be used
+                        instead os static IP based discovery.
+                    -->
+                    <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
+                    <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
+                        <property name="addresses">
+                            <list>
+                                <!-- In distributed environment, replace with actual host IP address. -->
+                                <value>127.0.0.1:47500..47501</value>
+                            </list>
+                        </property>
+                    </bean>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/odbc-example/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/odbc-example/configure.ac b/modules/platforms/cpp/examples/odbc-example/configure.ac
new file mode 100644
index 0000000..c2a5777
--- /dev/null
+++ b/modules/platforms/cpp/examples/odbc-example/configure.ac
@@ -0,0 +1,38 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([Ingnite C++ examples],[1.5.3.8189],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
+AC_CONFIG_SRCDIR(src)
+
+AC_CANONICAL_SYSTEM
+AC_CONFIG_MACRO_DIR([m4])
+AC_LANG([C++])
+
+# Initialize automake
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
+AC_CONFIG_HEADER(config.h)
+
+AM_PROG_AR
+
+# Checks for programs.
+GXX="-g -O2"
+
+AC_PROG_CXX
+
+# Initialize Libtool
+LT_INIT
+
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],[enable debug build [default=no]])],
+ [],[enable_debug=no])
+
+if test "x$enable_debug" = xyes; then
+    CXXFLAGS="-g -O0"
+else
+    CXXFLAGS="-g -O3"
+fi
+
+AC_CONFIG_FILES(Makefile)
+
+AC_OUTPUT

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/odbc-example/project/vs/odbc-example.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/odbc-example/project/vs/odbc-example.vcxproj b/modules/platforms/cpp/examples/odbc-example/project/vs/odbc-example.vcxproj
new file mode 100644
index 0000000..9010418
--- /dev/null
+++ b/modules/platforms/cpp/examples/odbc-example/project/vs/odbc-example.vcxproj
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{56839DFF-6C03-416B-BC5F-DDC6EBF8512D}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>igniteexamples</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\..\include;..\..\..\..\common\os\win\include;..\..\..\..\common\include;..\..\..\..\binary\include;..\..\..\..\core\os\win\include;..\..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.binary.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <PostBuildEvent>
+      <Command>copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\..\include;..\..\..\..\common\os\win\include;..\..\..\..\common\include;..\..\..\..\binary\include;..\..\..\..\core\os\win\include;..\..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.binary.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <PostBuildEvent>
+      <Command>copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\odbc_example.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\include\ignite\examples\address.h" />
+    <ClInclude Include="..\..\..\include\ignite\examples\organization.h" />
+    <ClInclude Include="..\..\..\include\ignite\examples\person.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/odbc-example/project/vs/odbc-example.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/odbc-example/project/vs/odbc-example.vcxproj.filters b/modules/platforms/cpp/examples/odbc-example/project/vs/odbc-example.vcxproj.filters
new file mode 100644
index 0000000..44fff7c
--- /dev/null
+++ b/modules/platforms/cpp/examples/odbc-example/project/vs/odbc-example.vcxproj.filters
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{6400d7ba-6390-4cdb-aa25-9525f8a71444}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\odbc_example.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\include\ignite\examples\address.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\include\ignite\examples\organization.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\include\ignite\examples\person.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/odbc-example/src/odbc_example.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/odbc-example/src/odbc_example.cpp b/modules/platforms/cpp/examples/odbc-example/src/odbc_example.cpp
new file mode 100644
index 0000000..c51c98f
--- /dev/null
+++ b/modules/platforms/cpp/examples/odbc-example/src/odbc_example.cpp
@@ -0,0 +1,286 @@
+/*
+ * 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.
+ */
+
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+#include <sql.h>
+#include <sqlext.h>
+
+#include <iostream>
+#include <iomanip>
+#include <vector>
+#include <string>
+#include <sstream>
+
+#include "ignite/ignite.h"
+#include "ignite/ignition.h"
+
+#include "ignite/examples/person.h"
+#include "ignite/examples/organization.h"
+
+using namespace ignite;
+using namespace cache;
+
+using namespace examples;
+
+/**
+ * This example populates cache with sample data and runs several SQL queries
+ * over this data using system ODBC API and Apache Ignite ODBC driver.
+ *
+ * To run this example you should first install ODBC driver as described in
+ * README file for the ODBC driver project.
+ *
+ * After all pre-requirements are fulfilled just build project as described
+ * in README and run resulting file.
+ */
+
+/** Read buffer size. */
+enum { ODBC_BUFFER_SIZE = 1024 };
+
+/**
+ * Represents simple string buffer.
+ */
+struct OdbcStringBuffer
+{
+    SQLCHAR buffer[ODBC_BUFFER_SIZE];
+    SQLLEN reallen;
+};
+
+/**
+ * Print result set returned by query.
+ *
+ * @param stmt Statement.
+ */
+void PrintOdbcResultSet(SQLHSTMT stmt)
+{
+    SQLSMALLINT columnsCnt = 0;
+
+    // Getting number of columns in result set.
+    SQLNumResultCols(stmt, &columnsCnt);
+
+    std::vector<OdbcStringBuffer> columns(columnsCnt);
+
+    // Binding colums.
+    for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
+        SQLBindCol(stmt, i + 1, SQL_CHAR, columns[i].buffer, ODBC_BUFFER_SIZE, &columns[i].reallen);
+
+    while (true)
+    {
+        SQLRETURN ret = SQLFetch(stmt);
+
+        if (!SQL_SUCCEEDED(ret))
+            break;
+
+        std::cout << ">>> ";
+
+        for (size_t i = 0; i < columns.size(); ++i)
+            std::cout << std::setw(16) << std::left << columns[i].buffer << " ";
+
+        std::cout << std::endl;
+    }
+}
+
+/**
+ * Extract error message.
+ *
+ * @param handleType Type of the handle.
+ * @param handle Handle.
+ * @return Error message.
+ */
+std::string GetOdbcErrorMessage(SQLSMALLINT handleType, SQLHANDLE handle)
+{
+    SQLCHAR sqlstate[7] = {};
+    SQLINTEGER nativeCode;
+
+    SQLCHAR message[ODBC_BUFFER_SIZE];
+    SQLSMALLINT reallen = 0;
+
+    SQLGetDiagRec(handleType, handle, 1, sqlstate, &nativeCode, message, ODBC_BUFFER_SIZE, &reallen);
+
+    return std::string(reinterpret_cast<char*>(sqlstate)) + ": " +
+        std::string(reinterpret_cast<char*>(message), reallen);
+}
+
+/**
+ * Fetch cache data using ODBC interface.
+ */
+void GetDataWithOdbc(const std::string& query)
+{
+    SQLHENV env;
+
+    // Allocate an environment handle
+    SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env);
+
+    // We want ODBC 3 support
+    SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, reinterpret_cast<void*>(SQL_OV_ODBC3), 0);
+
+    SQLHDBC dbc;
+
+    // Allocate a connection handle
+    SQLAllocHandle(SQL_HANDLE_DBC, env, &dbc);
+
+    // Combining connect string
+    std::string connectStr = "DRIVER={Apache Ignite};SERVER=localhost;PORT=11443;CACHE=Person;";
+
+    SQLCHAR outstr[ODBC_BUFFER_SIZE];
+    SQLSMALLINT outstrlen;
+
+    // Connecting to ODBC server.
+    SQLRETURN ret = SQLDriverConnect(dbc, NULL, reinterpret_cast<SQLCHAR*>(&connectStr[0]),
+        static_cast<SQLSMALLINT>(connectStr.size()), outstr, sizeof(outstr), &outstrlen, SQL_DRIVER_COMPLETE);
+
+    if (!SQL_SUCCEEDED(ret))
+    {
+        std::cerr << "Failed to connect: " << GetOdbcErrorMessage(SQL_HANDLE_DBC, dbc) << std::endl;
+
+        return;
+    }
+
+    SQLHSTMT stmt;
+
+    // Allocate a statement handle
+    SQLAllocHandle(SQL_HANDLE_STMT, dbc, &stmt);
+
+    std::vector<SQLCHAR> buf(query.begin(), query.end());
+
+    ret = SQLExecDirect(stmt, &buf[0], static_cast<SQLSMALLINT>(buf.size()));
+
+    if (SQL_SUCCEEDED(ret))
+        PrintOdbcResultSet(stmt);
+    else
+        std::cerr << "Failed to execute query: " << GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt) << std::endl;
+
+    // Releasing statement handle.
+    SQLFreeHandle(SQL_HANDLE_STMT, stmt);
+
+    // Disconneting from the server.
+    SQLDisconnect(dbc);
+
+    // Releasing allocated handles.
+    SQLFreeHandle(SQL_HANDLE_DBC, dbc);
+    SQLFreeHandle(SQL_HANDLE_ENV, env);
+}
+
+/**
+ * Populate Person cache with sample data.
+ * 
+ * @param cache Cache instance.
+ */
+void Populate(Cache<int64_t, Person>& cache)
+{
+    std::map<int64_t, Person> persons;
+
+    int64_t key = 0;
+    persons[++key] = Person(1, "John", "Doe", "Master Degree.", 2200.0);
+    persons[++key] = Person(1, "Jane", "Doe", "Bachelor Degree.", 1300.0);
+    persons[++key] = Person(2, "John", "Smith", "Bachelor Degree.", 1700.0);
+    persons[++key] = Person(2, "Jane", "Smith", "Master Degree.", 2500.0);
+    persons[++key] = Person(2, "John", "Roe", "Bachelor Degree.", 1500.0);
+    persons[++key] = Person(2, "Jane", "Roe", "Bachelor Degree.", 1000.0);
+    persons[++key] = Person(1, "Richard", "Miles", "Master Degree.", 2400.0);
+    persons[++key] = Person(2, "Mary", "Major", "Bachelor Degree.", 900.0);
+
+    cache.PutAll(persons);
+}
+
+/**
+ * Populate Organization cache with sample data.
+ * 
+ * @param cache Cache instance.
+ */
+void Populate(Cache<int64_t, Organization>& cache)
+{
+    std::map<int64_t, Organization> orgs;
+
+    int64_t key = 0;
+    orgs[++key] = Organization("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
+    orgs[++key] = Organization("Red Cross", Address("184 Fidler Drive, San Antonio, TX", 78205));
+
+    cache.PutAll(orgs);
+}
+
+/**
+ * Program entry point.
+ *
+ * @return Exit code.
+ */
+int main() 
+{
+    IgniteConfiguration cfg;
+
+    cfg.jvmInitMem = 512;
+    cfg.jvmMaxMem = 512;
+
+    cfg.springCfgPath = "platforms/cpp/examples/odbc-example/config/example-odbc.xml";
+
+    try
+    {
+        // Start a node.
+        Ignite grid = Ignition::Start(cfg);
+
+        std::cout << std::endl;
+        std::cout << ">>> Cache ODBC example started." << std::endl;
+        std::cout << std::endl;
+
+        // Get Person cache instance.
+        Cache<int64_t, Person> personCache = grid.GetCache<int64_t, Person>("Person");
+
+        // Get Organization cache instance.
+        Cache<int64_t, Organization> orgCache = grid.GetCache<int64_t, Organization>("Organization");
+
+        // Clear caches.
+        personCache.Clear();
+        orgCache.Clear();
+
+        // Populate caches.
+        Populate(personCache);
+        Populate(orgCache);
+
+        std::cout << std::endl;
+        std::cout << ">>> Getting list of persons:" << std::endl;
+
+        GetDataWithOdbc("SELECT firstName, lastName, resume, salary FROM Person");
+
+        std::cout << std::endl;
+        std::cout << ">>> Getting average salary by degree:" << std::endl;
+
+        GetDataWithOdbc("SELECT resume, AVG(salary) FROM Person GROUP BY resume");
+
+        std::cout << std::endl;
+        std::cout << ">>> Getting people with organizations:" << std::endl;
+
+        GetDataWithOdbc("SELECT firstName, lastName, Organization.name FROM Person "
+            "INNER JOIN \"Organization\".Organization ON Person.orgId = Organization._KEY");
+
+        // Stop node.
+        Ignition::StopAll(false);
+    }
+    catch (IgniteError& err)
+    {
+        std::cout << "An error occurred: " << err.GetText() << std::endl;
+    }
+
+    std::cout << std::endl;
+    std::cout << ">>> Example finished, press any key to exit ..." << std::endl;
+    std::cout << std::endl;
+
+    std::cin.get();
+
+    return 0;
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/project/vs/ignite-examples.sln b/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
index 4970654..e9da5e4 100644
--- a/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
+++ b/modules/platforms/cpp/examples/project/vs/ignite-examples.sln
@@ -1,6 +1,11 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ignite-examples", "ignite-examples.vcxproj", "{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}"
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "putget-example", "..\..\putget-example\project\vs\putget-example.vcxproj", "{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "odbc-example", "..\..\odbc-example\project\vs\odbc-example.vcxproj", "{56839DFF-6C03-416B-BC5F-DDC6EBF8512D}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -12,6 +17,10 @@ Global
 		{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x64.Build.0 = Release|x64
 		{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.ActiveCfg = Release|Win32
 		{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}.Release|x86.Build.0 = Release|Win32
+		{56839DFF-6C03-416B-BC5F-DDC6EBF8512D}.Release|x64.ActiveCfg = Release|x64
+		{56839DFF-6C03-416B-BC5F-DDC6EBF8512D}.Release|x64.Build.0 = Release|x64
+		{56839DFF-6C03-416B-BC5F-DDC6EBF8512D}.Release|x86.ActiveCfg = Release|Win32
+		{56839DFF-6C03-416B-BC5F-DDC6EBF8512D}.Release|x86.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj b/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj
deleted file mode 100644
index b04bfb9..0000000
--- a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}</ProjectGuid>
-    <Keyword>Win32Proj</Keyword>
-    <RootNamespace>igniteexamples</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v100</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v100</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <LinkIncremental>false</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\common\os\win\include;..\..\..\common\include;..\..\..\core\os\win\include;..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Console</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-    </Link>
-    <PostBuildEvent>
-      <Command>copy "$(ProjectDir)..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
-copy "$(ProjectDir)..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\include;..\..\..\common\os\win\include;..\..\..\common\include;..\..\..\core\os\win\include;..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Console</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-    </Link>
-    <PostBuildEvent>
-      <Command>copy "$(ProjectDir)..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
-copy "$(ProjectDir)..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
-    </PostBuildEvent>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClCompile Include="..\..\src\putgetexample.cpp" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\include\ignite\examples\address.h" />
-    <ClInclude Include="..\..\include\ignite\examples\organization.h" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj.filters b/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj.filters
deleted file mode 100644
index ca62db7..0000000
--- a/modules/platforms/cpp/examples/project/vs/ignite-examples.vcxproj.filters
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="Source Files">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-    <Filter Include="Header Files">
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
-    </Filter>
-    <Filter Include="Resource Files">
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="..\..\src\putgetexample.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\include\ignite\examples\address.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\include\ignite\examples\organization.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-  </ItemGroup>
-</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/putget-example/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/Makefile.am b/modules/platforms/cpp/examples/putget-example/Makefile.am
new file mode 100644
index 0000000..f036194
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/Makefile.am
@@ -0,0 +1,39 @@
+##
+## 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.
+##
+
+ACLOCAL_AMFLAGS = "-Im4"
+
+SUBDIRS = .
+DIST_SUBDIRS = .
+
+AM_CPPFLAGS = -I$(srcdir)/../include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -DIGNITE_IMPL
+AM_CXXFLAGS = -Wall -std=c++0x
+
+noinst_PROGRAMS = ignite-putgetexample
+
+ignite_putgetexample_SOURCES = src/putget_example.cpp
+
+ignite_putgetexample_LDFLAGS = -static-libtool-libs -L/usr/local/lib -lignite
+
+run-check: check
+	./ignite-putgetexample -p
+
+clean-local: clean-check
+	$(RM) *.gcno *.gcda
+
+clean-check:
+	$(RM) $(ignite_putgetexample_OBJECTS)

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/config/example-cache.xml b/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
new file mode 100644
index 0000000..28b726c
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/config/example-cache.xml
@@ -0,0 +1,75 @@
+<?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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       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">
+    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+        <!-- Set to true to enable distributed class loading for examples, default is false. -->
+        <property name="peerClassLoadingEnabled" value="true"/>
+
+        <property name="cacheConfiguration">
+            <list>
+                <!--
+                    Partitioned cache example configuration with binary objects enabled.
+                -->
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="atomicityMode" value="ATOMIC"/>
+                    <property name="backups" value="1"/>
+                </bean>
+
+                <!--
+                    Partitioned cache example configuration.
+                -->
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="name" value="tx"/>
+                    <property name="atomicityMode" value="TRANSACTIONAL"/>
+                    <property name="backups" value="1"/>
+                </bean>
+            </list>
+        </property>
+
+        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <property name="ipFinder">
+                    <!--
+                        Ignite provides several options for automatic discovery that can be used
+                        instead os static IP based discovery.
+                    -->
+                    <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
+                    <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
+                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
+                        <property name="addresses">
+                            <list>
+                                <!-- In distributed environment, replace with actual host IP address. -->
+                                <value>127.0.0.1:47500..47501</value>
+                            </list>
+                        </property>
+                    </bean>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/putget-example/configure.ac
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/configure.ac b/modules/platforms/cpp/examples/putget-example/configure.ac
new file mode 100644
index 0000000..09f0a8a
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/configure.ac
@@ -0,0 +1,55 @@
+#
+# 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.
+#
+
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([Ingnite C++ Put-Get examples],[1.6.0.8653],[dec@ignite.apache.org],[ignite-examples],[ignite.apache.org])
+AC_CONFIG_SRCDIR(src)
+
+AC_CANONICAL_SYSTEM
+AC_CONFIG_MACRO_DIR([m4])
+AC_LANG([C++])
+
+# Initialize automake
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
+AC_CONFIG_HEADER(config.h)
+
+AM_PROG_AR
+
+# Checks for programs.
+GXX="-g -O2"
+
+AC_PROG_CXX
+
+# Initialize Libtool
+LT_INIT
+
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],[enable debug build [default=no]])],
+ [],[enable_debug=no])
+
+if test "x$enable_debug" = xyes; then
+    CXXFLAGS="-g -O0"
+else
+    CXXFLAGS="-g -O3"
+fi
+
+AC_CONFIG_FILES(Makefile)
+
+AC_OUTPUT

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj
new file mode 100644
index 0000000..55aff5b
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{34935DEC-80FC-4168-AA52-3DBFF4F79B6B}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>igniteexamples</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\..\include;..\..\..\..\common\os\win\include;..\..\..\..\common\include;..\..\..\..\binary\include;..\..\..\..\core\os\win\include;..\..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.binary.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <PostBuildEvent>
+      <Command>copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;..\..\..\include;..\..\..\..\common\os\win\include;..\..\..\..\common\include;..\..\..\..\binary\include;..\..\..\..\core\os\win\include;..\..\..\..\core\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>jvm.lib;ignite.common.lib;ignite.binary.lib;ignite.core.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>..\..\..\..\project\vs\$(Platform)\$(Configuration)\;$(JAVA_HOME)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+    <PostBuildEvent>
+      <Command>copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.common.dll" "$(OutDir)"
+copy "$(ProjectDir)..\..\..\..\project\vs\$(Platform)\$(Configuration)\ignite.core.dll" "$(OutDir)"</Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\putget_example.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\include\ignite\examples\address.h" />
+    <ClInclude Include="..\..\..\include\ignite\examples\organization.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj.filters b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj.filters
new file mode 100644
index 0000000..1bcaff5
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/project/vs/putget-example.vcxproj.filters
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\putget_example.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\..\include\ignite\examples\address.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\include\ignite\examples\organization.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/d208e44b/modules/platforms/cpp/examples/putget-example/src/putget_example.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/putget-example/src/putget_example.cpp b/modules/platforms/cpp/examples/putget-example/src/putget_example.cpp
new file mode 100644
index 0000000..0b57886
--- /dev/null
+++ b/modules/platforms/cpp/examples/putget-example/src/putget_example.cpp
@@ -0,0 +1,126 @@
+/*
+ * 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.
+ */
+
+#include <iostream>
+
+#include "ignite/ignite.h"
+#include "ignite/ignition.h"
+
+#include "ignite/examples/organization.h"
+
+using namespace ignite;
+using namespace cache;
+
+using namespace examples;
+
+/*
+ * Execute individual Put and Get operations.
+ * 
+ * @param cache Cache instance.
+ */
+void PutGet(Cache<int, Organization>& cache) 
+{
+    // Create new Organization to store in cache.
+    Organization org("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
+
+    // Put organization to cache.
+    cache.Put(1, org);
+
+    // Get recently created employee as a strongly-typed fully de-serialized instance.
+    Organization orgFromCache = cache.Get(1);
+
+    std::cout <<  ">>> Retrieved organization instance from cache: " << std::endl;
+    std::cout << orgFromCache.ToString() << std::endl;
+    std::cout << std::endl;
+}
+
+/*
+ * Execute bulk Put and Get operations.
+ */
+void PutGetAll(Cache<int, Organization>& cache) 
+{
+    // Create new Organizations to store in cache.
+    Organization org1("Microsoft", Address("1096 Eddy Street, San Francisco, CA", 94109));
+    Organization org2("Red Cross", Address("184 Fidler Drive, San Antonio, TX", 78205));
+
+    // Put created data entries to cache.
+    std::map<int, Organization> vals;
+
+    vals[1] = org1;
+    vals[2] = org2;
+
+    cache.PutAll(vals);
+
+    // Get recently created organizations as a strongly-typed fully de-serialized instances.
+    std::set<int> keys;
+
+    keys.insert(1);
+    keys.insert(2);
+
+    std::map<int, Organization> valsFromCache = cache.GetAll(keys);
+
+    std::cout <<  ">>> Retrieved organization instances from cache: " << std::endl;
+
+    for (std::map<int, Organization>::iterator it = valsFromCache.begin(); it != valsFromCache.end(); ++it) 
+        std::cout <<  it->second.ToString() << std::endl;
+
+    std::cout << std::endl;
+}
+
+int main()
+{
+    IgniteConfiguration cfg;
+
+    cfg.jvmInitMem = 512;
+    cfg.jvmMaxMem = 512;
+
+    cfg.springCfgPath = "platforms/cpp/examples/putget-example/config/example-cache.xml";
+
+    try
+    {
+        // Start a node.
+        Ignite grid = Ignition::Start(cfg);
+
+        std::cout << std::endl;
+        std::cout << ">>> Cache put-get example started." << std::endl;
+        std::cout << std::endl;
+
+        // Get cache instance.
+        Cache<int, Organization> cache = grid.GetCache<int, Organization>(NULL);
+
+        // Clear cache.
+        cache.Clear();
+
+        PutGet(cache);
+        PutGetAll(cache);
+
+        // Stop node.
+        Ignition::StopAll(false);
+    }
+    catch (IgniteError& err)
+    {
+        std::cout << "An error occurred: " << err.GetText() << std::endl;
+    }
+
+    std::cout << std::endl;
+    std::cout << ">>> Example finished, press any key to exit ..." << std::endl;
+    std::cout << std::endl;
+
+    std::cin.get();
+
+    return 0;
+}
\ No newline at end of file


Mime
View raw message