ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [09/12] ignite git commit: IGNITE-2823: CPP/ODBC: Splitted common in two libs. This closes #554.
Date Wed, 27 Apr 2016 08:16:10 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/linux/src/common/concurrent_os.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/linux/src/common/concurrent_os.cpp b/modules/platforms/cpp/common/os/linux/src/common/concurrent_os.cpp
new file mode 100644
index 0000000..2336d58
--- /dev/null
+++ b/modules/platforms/cpp/common/os/linux/src/common/concurrent_os.cpp
@@ -0,0 +1,175 @@
+/*
+ * 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 "ignite/common/concurrent_os.h"
+
+namespace ignite
+{
+    namespace common
+    {
+        namespace concurrent
+        {
+            /** Key indicating that the thread is attached. */
+            static pthread_key_t tlsKey;
+
+            /** Helper to ensure that attach key is allocated only once. */
+            static pthread_once_t tlsKeyInit = PTHREAD_ONCE_INIT;
+            
+            /**
+             * Routine to destroy TLS key.
+             * 
+             * @param key Key.
+             */
+            void DestroyTlsKey(void* key) {
+                ThreadLocal::Clear0(key);
+            }
+            
+            /**
+             * Routine to allocate TLS key.
+             */
+            void AllocateTlsKey() {
+                pthread_key_create(&tlsKey, DestroyTlsKey);
+            }
+            
+            void Memory::Fence() {
+                __asm__ volatile ("" ::: "memory");
+            }
+
+            CriticalSection::CriticalSection() {
+                pthread_mutex_init(&mux, NULL);
+                
+                Memory::Fence();
+            }
+
+            CriticalSection::~CriticalSection() {
+                Memory::Fence();
+                
+                pthread_mutex_destroy(&mux);
+            }
+
+            void CriticalSection::Enter() {
+                Memory::Fence();
+                
+                pthread_mutex_lock(&mux);
+            }
+
+            void CriticalSection::Leave() {
+                Memory::Fence();
+                
+                pthread_mutex_unlock(&mux);
+            }
+
+            SingleLatch::SingleLatch()
+            {
+                pthread_mutex_init(&mux, NULL);
+                pthread_cond_init(&cond, NULL);
+                ready = false;
+                
+                Memory::Fence();
+            }
+
+            SingleLatch::~SingleLatch()
+            {
+                Memory::Fence();
+
+                pthread_cond_destroy(&cond);
+                pthread_mutex_destroy(&mux);
+            }
+
+            void SingleLatch::CountDown()
+            {
+                pthread_mutex_lock(&mux);
+                
+                if (!ready) {
+                    ready = true;
+                    
+                    pthread_cond_broadcast(&cond);
+                }
+                
+                pthread_mutex_unlock(&mux);
+                
+                Memory::Fence();
+            }
+
+            void SingleLatch::Await()
+            {
+                pthread_mutex_lock(&mux);
+                
+                while (!ready)
+                    pthread_cond_wait(&cond, &mux);
+                
+                pthread_mutex_unlock(&mux);
+                
+                Memory::Fence();
+            }
+
+            bool Atomics::CompareAndSet32(int32_t* ptr, int32_t expVal, int32_t newVal)
+            {
+                return __sync_bool_compare_and_swap(ptr, expVal, newVal);
+            }
+
+            int32_t Atomics::CompareAndSet32Val(int32_t* ptr, int32_t expVal, int32_t newVal)
+            {
+                return __sync_val_compare_and_swap(ptr, expVal, newVal);
+            }
+
+            int32_t Atomics::IncrementAndGet32(int32_t* ptr)
+            {
+               return __sync_fetch_and_add(ptr, 1) + 1;
+            }
+
+            int32_t Atomics::DecrementAndGet32(int32_t* ptr)
+            {
+               return __sync_fetch_and_sub(ptr, 1) - 1;
+            }
+
+            bool Atomics::CompareAndSet64(int64_t* ptr, int64_t expVal, int64_t newVal)
+            {
+               return __sync_bool_compare_and_swap(ptr, expVal, newVal);
+            }
+
+            int64_t Atomics::CompareAndSet64Val(int64_t* ptr, int64_t expVal, int64_t newVal)
+            {
+               return __sync_val_compare_and_swap(ptr, expVal, newVal);
+            }
+
+            int64_t Atomics::IncrementAndGet64(int64_t* ptr)
+            {
+               return __sync_fetch_and_add(ptr, 1) + 1;
+            }
+
+            int64_t Atomics::DecrementAndGet64(int64_t* ptr)
+            {
+               return __sync_fetch_and_sub(ptr, 1) - 1;
+            }
+
+            void* ThreadLocal::Get0()
+            {
+                pthread_once(&tlsKeyInit, AllocateTlsKey);
+                                
+                return pthread_getspecific(tlsKey);
+            }
+
+            void ThreadLocal::Set0(void* ptr)
+            {
+                pthread_once(&tlsKeyInit, AllocateTlsKey);
+                
+                pthread_setspecific(tlsKey, ptr);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/linux/src/common/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/linux/src/common/utils.cpp b/modules/platforms/cpp/common/os/linux/src/common/utils.cpp
new file mode 100644
index 0000000..e37a91c
--- /dev/null
+++ b/modules/platforms/cpp/common/os/linux/src/common/utils.cpp
@@ -0,0 +1,136 @@
+/*
+ * 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 <time.h>
+
+#include <sys/stat.h>
+#include <dirent.h>
+#include <dlfcn.h>
+
+#include <ignite/common/utils.h>
+
+namespace ignite
+{
+    namespace common
+    {
+        /**
+         * Check if string ends with the given ending.
+         *
+         * @param str String to check.
+         * @param ending Ending.
+         * @return Result.
+         */
+        inline bool StringEndsWith(const std::string& str, const std::string& ending)
+        {
+            if (str.length() > ending.length())
+                return str.compare(str.length() - ending.length(), ending.length(), ending) == 0;
+
+            return false;
+        }
+
+        time_t IgniteTimeGm(const tm& time)
+        {
+            tm tmc = time;
+
+            return timegm(&tmc);
+        }
+
+        time_t IgniteTimeLocal(const tm& time)
+        {
+            tm tmc = time;
+
+            return mktime(&tmc);
+        }
+
+        bool IgniteGmTime(time_t in, tm& out)
+        {
+            return gmtime_r(&in, &out) != NULL;
+        }
+
+        bool IgniteLocalTime(time_t in, tm& out)
+        {
+            return localtime_r(&in, &out) == 0;
+        }
+
+        int LeadingZeroesForOctet(int8_t octet) {
+            if (octet == 0)
+                return 8;
+
+            int zeroes = 1;
+
+            if (octet >> 4 == 0) {
+                zeroes += 4;
+                octet <<= 4;
+            }
+
+            if (octet >> 6 == 0) {
+                zeroes += 2;
+                octet <<= 2;
+            }
+
+            zeroes -= octet >> 7;
+
+            return zeroes;
+        }
+
+        char* CopyChars(const char* val)
+        {
+            if (val) {
+                size_t len = strlen(val);
+                char* dest = new char[len + 1];
+                strcpy(dest, val);
+                *(dest + len) = 0;
+                return dest;
+            }
+            else
+                return NULL;
+        }
+
+        void ReleaseChars(char* val)
+        {
+            if (val)
+                delete[] val;
+        }
+
+        std::string GetEnv(const std::string& name, bool& found)
+        {
+            char* val = std::getenv(name.c_str());
+            
+            if (val)
+            {
+                found = true;
+                
+                return std::string(val);
+            }
+            else
+            {
+                found = false;
+                
+                return std::string();
+            }
+        }
+
+        bool FileExists(const std::string& path)
+        {
+            struct stat s;
+            
+            int res = stat(path.c_str(), &s);
+
+            return res != -1;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/linux/src/concurrent_os.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/linux/src/concurrent_os.cpp b/modules/platforms/cpp/common/os/linux/src/concurrent_os.cpp
deleted file mode 100644
index 44f0b22..0000000
--- a/modules/platforms/cpp/common/os/linux/src/concurrent_os.cpp
+++ /dev/null
@@ -1,175 +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.
- */
-
-#include "ignite/common/concurrent_os.h"
-
-namespace ignite
-{
-    namespace common
-    {
-        namespace concurrent
-        {
-            /** Key indicating that the thread is attached. */
-            static pthread_key_t tlsKey;
-
-            /** Helper to ensure that attach key is allocated only once. */
-            static pthread_once_t tlsKeyInit = PTHREAD_ONCE_INIT;
-            
-            /**
-             * Routine to destroy TLS key.
-             * 
-             * @param key Key.
-             */
-            void DestroyTlsKey(void* key) {
-                ThreadLocal::Clear0(key);
-            }
-            
-            /**
-             * Routine to allocate TLS key.
-             */
-            void AllocateTlsKey() {
-                pthread_key_create(&tlsKey, DestroyTlsKey);
-            }
-            
-            void Memory::Fence() {
-                __asm__ volatile ("" ::: "memory");
-            }
-
-            CriticalSection::CriticalSection() {
-                pthread_mutex_init(&mux, NULL);
-                
-                Memory::Fence();
-            }
-
-            CriticalSection::~CriticalSection() {
-                Memory::Fence();
-                
-                pthread_mutex_destroy(&mux);
-            }
-
-            void CriticalSection::Enter() {
-                Memory::Fence();
-                
-                pthread_mutex_lock(&mux);
-            }
-
-            void CriticalSection::Leave() {
-                Memory::Fence();
-                
-                pthread_mutex_unlock(&mux);
-            }
-
-            SingleLatch::SingleLatch()
-            {
-                pthread_mutex_init(&mux, NULL);
-                pthread_cond_init(&cond, NULL);
-                ready = false;
-                
-                Memory::Fence();
-            }
-
-            SingleLatch::~SingleLatch()
-            {
-                Memory::Fence();
-
-                pthread_cond_destroy(&cond);
-                pthread_mutex_destroy(&mux);
-            }
-
-            void SingleLatch::CountDown()
-            {
-                pthread_mutex_lock(&mux);
-                
-                if (!ready) {
-                    ready = true;
-                    
-                    pthread_cond_broadcast(&cond);
-                }
-                
-                pthread_mutex_unlock(&mux);
-                
-                Memory::Fence();
-            }
-
-            void SingleLatch::Await()
-            {
-                pthread_mutex_lock(&mux);
-                
-                while (!ready)
-                    pthread_cond_wait(&cond, &mux);
-                
-                pthread_mutex_unlock(&mux);
-                
-                Memory::Fence();
-            }
-
-            bool Atomics::CompareAndSet32(int32_t* ptr, int32_t expVal, int32_t newVal)
-            {
-                return __sync_bool_compare_and_swap(ptr, expVal, newVal);
-            }
-
-            int32_t Atomics::CompareAndSet32Val(int32_t* ptr, int32_t expVal, int32_t newVal)
-            {
-                return __sync_val_compare_and_swap(ptr, expVal, newVal);
-            }
-
-            int32_t Atomics::IncrementAndGet32(int32_t* ptr)
-            {
-               return __sync_fetch_and_add(ptr, 1) + 1;
-            }
-
-            int32_t Atomics::DecrementAndGet32(int32_t* ptr)
-            {
-               return __sync_fetch_and_sub(ptr, 1) - 1;
-            }
-
-            bool Atomics::CompareAndSet64(int64_t* ptr, int64_t expVal, int64_t newVal)
-            {
-               return __sync_bool_compare_and_swap(ptr, expVal, newVal);
-            }
-
-            int64_t Atomics::CompareAndSet64Val(int64_t* ptr, int64_t expVal, int64_t newVal)
-            {
-               return __sync_val_compare_and_swap(ptr, expVal, newVal);
-            }
-
-            int64_t Atomics::IncrementAndGet64(int64_t* ptr)
-            {
-               return __sync_fetch_and_add(ptr, 1) + 1;
-            }
-
-            int64_t Atomics::DecrementAndGet64(int64_t* ptr)
-            {
-               return __sync_fetch_and_sub(ptr, 1) - 1;
-            }
-
-            void* ThreadLocal::Get0()
-            {
-                pthread_once(&tlsKeyInit, AllocateTlsKey);
-                                
-                return pthread_getspecific(tlsKey);
-            }
-
-            void ThreadLocal::Set0(void* ptr)
-            {
-                pthread_once(&tlsKeyInit, AllocateTlsKey);
-                
-                pthread_setspecific(tlsKey, ptr);
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/linux/src/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/linux/src/utils.cpp b/modules/platforms/cpp/common/os/linux/src/utils.cpp
deleted file mode 100644
index 534786f..0000000
--- a/modules/platforms/cpp/common/os/linux/src/utils.cpp
+++ /dev/null
@@ -1,484 +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.
- */
-#include <sys/stat.h>
-#include <dirent.h>
-#include <dlfcn.h>
-
-#include <ignite/common/utils.h>
-
-namespace ignite
-{
-    namespace common
-    {
-        namespace utils
-        {
-            const char* JAVA_HOME = "JAVA_HOME";
-            const char* JAVA_DLL = "/jre/lib/amd64/server/libjvm.so";
-
-            const char* IGNITE_HOME = "IGNITE_HOME";
-
-            const char* PROBE_BIN = "/bin";
-            const char* PROBE_EXAMPLES = "/examples";
-
-            const char* IGNITE_NATIVE_TEST_CLASSPATH = "IGNITE_NATIVE_TEST_CLASSPATH";
-
-            /**
-             * Helper method to set boolean result to reference with proper NULL-check.
-             *
-             * @param res Result.
-             * @param outRes Where to set the result.
-             */
-            inline void SetBoolResult(bool res, bool* outRes)
-            {
-                if (outRes)
-                    *outRes = res;
-            }
-
-            /**
-             * Check if string ends with the given ending.
-             *
-             * @param str String to check.
-             * @param ending Ending.
-             * @return Result.
-             */
-            inline bool StringEndsWith(const std::string& str, const std::string& ending)
-            {
-                if (str.length() > ending.length())
-                    return str.compare(str.length() - ending.length(), ending.length(), ending) == 0;
-
-                return false;
-            }
-                
-            /**
-             * Helper function for GG home resolution. Checks whether certain folders
-             * exist in the path. Optionally goes upwards in directory hierarchy.
-             *
-             * @param path Path to evaluate.
-             * @param up Whether to go upwards.
-             * @res Resolution result.
-             * @return Resolved directory.
-             */
-            std::string ResolveIgniteHome0(const std::string& path, bool up, bool* res)
-            {
-                struct stat pathStat;
-                
-                if (stat(path.c_str(), &pathStat) != -1 && S_ISDIR(pathStat.st_mode)) 
-                {
-                    // Remove trailing slashes, otherwise we will have an infinite loop.
-                    std::string path0 = path;
-
-                    while (true) {
-                        char lastChar = *path0.rbegin();
-
-                        if (lastChar == '/' || lastChar == ' ') {
-                            size_t off = path0.find_last_of(lastChar);
-
-                            path0.erase(off, 1);
-                        }
-                        else
-                            break;
-                    }
-
-                    std::string binStr = path0 + PROBE_BIN;
-                    struct stat binStat;
-
-                    std::string examplesStr = path0 + PROBE_EXAMPLES;
-                    struct stat examplesStat;
-
-                    if (stat(binStr.c_str(), &binStat) != -1 && S_ISDIR(binStat.st_mode) &&
-                        stat(examplesStr.c_str(), &examplesStat) != -1 && S_ISDIR(examplesStat.st_mode))
-                    {
-                        SetBoolResult(true, res);
-
-                        return std::string(path0);
-                    }
-
-                    if (up)
-                    {
-                        // Evaluate parent directory.
-                        size_t slashPos = path0.find_last_of("/");
-
-                        if (slashPos != std::string::npos)
-                        {
-                            std::string parent = path0.substr(0, slashPos);
-
-                            return ResolveIgniteHome0(parent, true, res);
-                        }
-                    }
-
-                }
-
-                SetBoolResult(false, res);
-
-                return std::string();
-            }
-
-            /**
-             * Create classpath picking JARs from the given path.
-             *
-             * @path Path.
-             * @return Classpath;
-             */
-            std::string ClasspathJars(const std::string& path)
-            {
-                std::string res = std::string();
-
-                DIR* dir = opendir(path.c_str());
-
-                if (dir)
-                {
-                    struct dirent* entry;
-
-                    while ((entry = readdir(dir)) != NULL)
-                    {
-                        if (strstr(entry->d_name, ".jar"))
-                        {
-                            res.append(path);
-                            res.append("/");
-                            res.append(entry->d_name);
-                            res.append(":");
-                        }
-                    }
-
-                    closedir(dir);
-                }
-
-                return res;
-            }
-
-            /**
-             * Create classpath picking compiled classes from the given path.
-             *
-             * @path Path.
-             * @return Classpath;
-             */
-            std::string ClasspathExploded(const std::string& path, bool down)
-            {
-                std::string res;
-
-                if (FileExists(path))
-                {
-                    // 1. Append "target\classes".
-                    std::string classesPath = path + "/target/classes";
-
-                    if (FileExists(classesPath)) {
-                        res += classesPath;
-                        res += ":";
-                    }
-
-                    // 2. Append "target\test-classes"
-                    std::string testClassesPath = path + "/target/test-classes";
-
-                    if (FileExists(testClassesPath)) {
-                        res += testClassesPath;
-                        res += ":";
-                    }
-
-                    // 3. Append "target\libs"
-                    std::string libsPath = path + "/target/libs";
-
-                    if (FileExists(libsPath)) {
-                        std::string libsCp = ClasspathJars(libsPath);
-                        res += libsCp;
-                    }
-
-                    // 4. Do the same for child if needed.
-                    if (down)
-                    {
-                        DIR* dir = opendir(path.c_str());
-
-                        if (dir)
-                        {
-                            struct dirent* entry;
-
-                            while ((entry = readdir(dir)) != NULL)
-                            {
-                                std::string entryPath = entry->d_name;
-
-                                if (entryPath.compare(".") != 0 && entryPath.compare("..") != 0)
-                                {
-                                    std::string entryFullPath = path + "/" + entryPath;
-
-                                    struct stat entryFullStat;
-
-                                    if (stat(entryFullPath.c_str(), &entryFullStat) != -1 && S_ISDIR(entryFullStat.st_mode))
-                                    {
-                                        std::string childCp = ClasspathExploded(entryFullPath, false);
-
-                                        res += childCp;
-                                    }
-                                }
-                            }
-
-                            closedir(dir);
-                        }
-                    }
-                }
-
-                return res;
-            }
-
-            /**
-             * Helper function to create classpath based on Ignite home directory.
-             *
-             * @param home Home directory; expected to be valid.
-             * @param forceTest Force test classpath.
-             */
-            std::string CreateIgniteHomeClasspath(const std::string& home, bool forceTest)
-            {
-                std::string res = std::string();
-
-                // 1. Add exploded test directories.
-                if (forceTest)
-                {
-                    std::string examplesPath = home + "/examples";
-                    std::string examplesCp = ClasspathExploded(examplesPath, true);
-                    res.append(examplesCp);
-
-                    std::string modulesPath = home + "/modules";
-                    std::string modulesCp = ClasspathExploded(modulesPath, true);
-                    res.append(modulesCp);
-                }
-
-                // 2. Add regular jars from "libs" folder excluding "optional".
-                std::string libsPath = home + "/libs";
-
-                if (FileExists(libsPath))
-                {
-                    res.append(ClasspathJars(libsPath));
-
-                    // Append inner directories.
-                    DIR* dir = opendir(libsPath.c_str());
-
-                    if (dir)
-                    {
-                        struct dirent* entry;
-
-                        while ((entry = readdir(dir)) != NULL)
-                        {
-                            std::string entryPath = entry->d_name;
-
-                            if (entryPath.compare(".") != 0 && entryPath.compare("..") != 0 &&
-                                entryPath.compare("optional") != 0)
-                            {
-                                std::string entryFullPath = libsPath;
-
-                                entryFullPath.append("/");
-                                entryFullPath.append(entryPath);
-
-                                struct stat entryFullStat;
-
-                                if (stat(entryFullPath.c_str(), &entryFullStat) != -1 && 
-                                    S_ISDIR(entryFullStat.st_mode)) 
-                                    res.append(ClasspathJars(entryFullPath));
-                            }                                                              
-                        }
-
-                        closedir(dir);
-                    }
-                }
-
-                // 3. Return.
-                return res;
-            }
-
-            time_t IgniteTimeGm(const tm& time)
-            {
-                tm tmc = time;
-
-                return timegm(&tmc);
-            }
-
-            time_t IgniteTimeLocal(const tm& time)
-            {
-                tm tmc = time;
-
-                return mktime(&tmc);
-            }
-
-            bool IgniteGmTime(time_t in, tm& out)
-            {
-                return gmtime_r(&in, &out) != NULL;
-            }
-
-            bool IgniteLocalTime(time_t in, tm& out)
-            {
-                return localtime_r(&in, &out) == 0;
-            }
-
-            int LeadingZeroesForOctet(int8_t octet) {
-                if (octet == 0)
-                    return 8;
-
-                int zeroes = 1;
-
-                if (octet >> 4 == 0) {
-                    zeroes += 4;
-                    octet <<= 4;
-                }
-
-                if (octet >> 6 == 0) {
-                    zeroes += 2;
-                    octet <<= 2;
-                }
-
-                zeroes -= octet >> 7;
-
-                return zeroes;
-            }
-
-            char* CopyChars(const char* val)
-            {
-                if (val) {
-                    size_t len = strlen(val);
-                    char* dest = new char[len + 1];
-                    strcpy(dest, val);
-                    *(dest + len) = 0;
-                    return dest;
-                }
-                else
-                    return NULL;
-            }
-
-            void ReleaseChars(char* val)
-            {
-                if (val)
-                    delete[] val;
-            }
-
-            std::string GetEnv(const std::string& name, bool* found)
-            {
-                char* val = std::getenv(name.c_str());
-                
-                if (val) {
-                    SetBoolResult(true, found);
-                    
-                    return std::string(val);
-                }
-                else {
-                    SetBoolResult(false, found);
-                    
-                    return std::string();
-                }
-            }
-
-            bool FileExists(const std::string& path)
-            {
-                struct stat s;
-                
-                int res = stat(path.c_str(), &s);
-
-                return res != -1;
-            }
-
-            std::string FindJvmLibrary(const std::string* path, bool* found)
-            {
-                SetBoolResult(true, found); // Optimistically assume that we will find it.
-
-                if (path) {
-                    // If path is provided explicitly, then check only it.
-                    if (FileExists(*path))                            
-                        return std::string(path->data());
-                }
-                else
-                {
-                    bool javaEnvFound;
-                    std::string javaEnv = GetEnv(JAVA_HOME, &javaEnvFound);
-
-                    if (javaEnvFound)
-                    {
-                        std::string javaDll = javaEnv + JAVA_DLL;
-
-                        if (FileExists(javaDll))
-                            return std::string(javaDll);
-                    }
-                }
-
-                SetBoolResult(false, found);
-
-                return std::string();
-            }
-
-            bool LoadJvmLibrary(const std::string& path)
-            {
-                void* hnd = dlopen(path.c_str(), RTLD_LAZY);
-                
-                return hnd != NULL;
-            }                
-
-            std::string ResolveIgniteHome(const std::string* path, bool* found)
-            {
-                if (path)
-                    // 1. Check passed argument.
-                    return ResolveIgniteHome0(*path, false, found);
-                else
-                {
-                    // 2. Check environment variable.
-                    bool envFound;
-                    std::string env = GetEnv(IGNITE_HOME, &envFound);
-
-                    if (envFound)
-                        return ResolveIgniteHome0(env, false, found);
-                }
-
-                SetBoolResult(false, found);
-                        
-                return std::string();
-            }
-
-            std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home)
-            {
-                bool forceTest = false;
-
-                if (home)
-                {
-                    bool envFound;
-                    std::string env = GetEnv(IGNITE_NATIVE_TEST_CLASSPATH, &envFound);
-
-                    forceTest = envFound && env.compare("true") == 0;
-                }
-
-                return CreateIgniteClasspath(usrCp, home, forceTest);
-            }
-
-            std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool forceTest)
-            {
-                // 1. Append user classpath if it exists.
-                std::string cp = std::string();
-
-                if (usrCp)
-                {
-                    cp.append(*usrCp);
-
-                    if (*cp.rbegin() != ':')
-                        cp.append(":");
-                }
-
-                // 2. Append home classpath if home is defined.
-                if (home)
-                {
-                    std::string homeCp = CreateIgniteHomeClasspath(*home, forceTest);
-
-                    cp.append(homeCp);
-                }
-
-                // 3. Return.
-                return cp;
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/win/include/ignite/common/common.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/win/include/ignite/common/common.h b/modules/platforms/cpp/common/os/win/include/ignite/common/common.h
index cf924c8..8285149 100644
--- a/modules/platforms/cpp/common/os/win/include/ignite/common/common.h
+++ b/modules/platforms/cpp/common/os/win/include/ignite/common/common.h
@@ -41,22 +41,4 @@
 #   define IGNITE_NO_THROW throw()
 #endif
 
-namespace ignite
-{
-    namespace common
-    {
-        /**
-         * Helper class to manage attached threads.
-         */
-        class AttachHelper 
-        {
-        public:                       
-            /**
-             * Callback invoked on successful thread attach ot JVM.
-             */
-            static void OnThreadAttach();
-        };   
-    }
-}
-
-#endif
\ No newline at end of file
+#endif //_IGNITE_COMMON_COMMON
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/win/include/ignite/common/concurrent_os.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/win/include/ignite/common/concurrent_os.h b/modules/platforms/cpp/common/os/win/include/ignite/common/concurrent_os.h
index 0a47beb..77de4d8 100644
--- a/modules/platforms/cpp/common/os/win/include/ignite/common/concurrent_os.h
+++ b/modules/platforms/cpp/common/os/win/include/ignite/common/concurrent_os.h
@@ -26,7 +26,7 @@
 
 namespace ignite
 {
-    namespace common 
+    namespace common
     {
         namespace concurrent 
         {
@@ -403,4 +403,4 @@ namespace ignite
     }
 }
 
-#endif
\ No newline at end of file
+#endif //_IGNITE_COMMON_CONCURRENT_OS
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/win/src/common.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/win/src/common.cpp b/modules/platforms/cpp/common/os/win/src/common.cpp
deleted file mode 100644
index e83e736..0000000
--- a/modules/platforms/cpp/common/os/win/src/common.cpp
+++ /dev/null
@@ -1,65 +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.
- */
-
-#include <windows.h>
-
-#include "ignite/common/common.h"
-#include "ignite/common/concurrent.h"
-#include "ignite/common/java.h"
-
-using namespace ignite::common::concurrent;
-using namespace ignite::common::java;
-
-namespace ignite
-{
-    namespace common
-    {
-        void AttachHelper::OnThreadAttach()
-        {
-            // No-op.
-        }
-    }
-}
-
-BOOL WINAPI DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
-{
-    switch (fdwReason)
-    {
-        case DLL_PROCESS_ATTACH:
-            if (!ThreadLocal::OnProcessAttach())
-                return FALSE;
-
-            break;
-
-        case DLL_THREAD_DETACH:
-            ThreadLocal::OnThreadDetach();
-
-            JniContext::Detach();
-
-            break;
-
-        case DLL_PROCESS_DETACH:
-            ThreadLocal::OnProcessDetach();
-
-            break;
-
-        default:
-            break;
-    }
-
-    return TRUE;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/win/src/common/concurrent_os.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/win/src/common/concurrent_os.cpp b/modules/platforms/cpp/common/os/win/src/common/concurrent_os.cpp
new file mode 100644
index 0000000..676d8b6
--- /dev/null
+++ b/modules/platforms/cpp/common/os/win/src/common/concurrent_os.cpp
@@ -0,0 +1,175 @@
+/*
+ * 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 "ignite/common/concurrent_os.h"
+
+#pragma intrinsic(_InterlockedCompareExchange64)
+
+namespace ignite
+{
+    namespace common
+    {
+        namespace concurrent
+        {
+            /** Thread-local index for Windows. */
+            DWORD winTlsIdx;
+
+            void Memory::Fence() {
+                MemoryBarrier();
+            }
+
+            CriticalSection::CriticalSection() : hnd(new CRITICAL_SECTION) {
+                InitializeCriticalSection(hnd);
+
+                Memory::Fence();
+            }
+
+            CriticalSection::~CriticalSection() {
+                Memory::Fence();
+
+                delete hnd;
+            }
+
+            void CriticalSection::Enter() {
+                Memory::Fence();
+
+                EnterCriticalSection(hnd);
+            }
+
+            void CriticalSection::Leave() {
+                Memory::Fence();
+
+                LeaveCriticalSection(hnd);
+            }
+
+            SingleLatch::SingleLatch() : hnd(CreateEvent(NULL, TRUE, FALSE, NULL))
+            {
+                Memory::Fence();
+            }
+
+            SingleLatch::~SingleLatch()
+            {
+                Memory::Fence();
+
+                CloseHandle(hnd);
+            }
+
+            void SingleLatch::CountDown()
+            {
+                SetEvent(hnd);
+            }
+
+            void SingleLatch::Await()
+            {
+                WaitForSingleObject(hnd, INFINITE);
+            }
+
+            bool Atomics::CompareAndSet32(int32_t* ptr, int32_t expVal, int32_t newVal)
+            {
+                return CompareAndSet32Val(ptr, expVal, newVal) == expVal;
+            }
+
+            int32_t Atomics::CompareAndSet32Val(int32_t* ptr, int32_t expVal, int32_t newVal)
+            {
+                return InterlockedCompareExchange(reinterpret_cast<LONG*>(ptr), newVal, expVal);
+            }
+
+            int32_t Atomics::IncrementAndGet32(int32_t* ptr)
+            {
+                return InterlockedIncrement(reinterpret_cast<LONG*>(ptr));
+            }
+
+            int32_t Atomics::DecrementAndGet32(int32_t* ptr)
+            {
+                return InterlockedDecrement(reinterpret_cast<LONG*>(ptr));
+            }
+
+            bool Atomics::CompareAndSet64(int64_t* ptr, int64_t expVal, int64_t newVal)
+            {
+                return CompareAndSet64Val(ptr, expVal, newVal) == expVal;
+            }
+
+            int64_t Atomics::CompareAndSet64Val(int64_t* ptr, int64_t expVal, int64_t newVal)
+            {
+                return _InterlockedCompareExchange64(reinterpret_cast<LONG64*>(ptr), newVal, expVal);
+            }
+
+            int64_t Atomics::IncrementAndGet64(int64_t* ptr)
+            {
+#ifdef _WIN64
+                return InterlockedIncrement64(reinterpret_cast<LONG64*>(ptr));
+#else 
+                while (true)
+                {
+                    int64_t expVal = *ptr;
+                    int64_t newVal = expVal + 1;
+
+                    if (CompareAndSet64(ptr, expVal, newVal))
+                        return newVal;
+                }
+#endif
+            }
+
+            int64_t Atomics::DecrementAndGet64(int64_t* ptr)
+            {
+#ifdef _WIN64
+                return InterlockedDecrement64(reinterpret_cast<LONG64*>(ptr));
+#else 
+                while (true)
+                {
+                    int64_t expVal = *ptr;
+                    int64_t newVal = expVal - 1;
+
+                    if (CompareAndSet64(ptr, expVal, newVal))
+                        return newVal;
+                }
+#endif
+            }
+            
+            bool ThreadLocal::OnProcessAttach()
+            {
+                return (winTlsIdx = TlsAlloc()) != TLS_OUT_OF_INDEXES;
+            }
+
+            void ThreadLocal::OnThreadDetach()
+            {
+                if (winTlsIdx != TLS_OUT_OF_INDEXES)
+                {
+                    void* mapPtr = Get0();
+
+                    Clear0(mapPtr);
+                }
+            }
+
+            void ThreadLocal::OnProcessDetach()
+            {
+                if (winTlsIdx != TLS_OUT_OF_INDEXES)
+                    TlsFree(winTlsIdx);
+            }
+
+            void* ThreadLocal::Get0()
+            {
+                return TlsGetValue(winTlsIdx);
+            }
+
+            void ThreadLocal::Set0(void* ptr)
+            {
+                TlsSetValue(winTlsIdx, ptr);
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/win/src/common/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/win/src/common/utils.cpp b/modules/platforms/cpp/common/os/win/src/common/utils.cpp
new file mode 100644
index 0000000..65236d2
--- /dev/null
+++ b/modules/platforms/cpp/common/os/win/src/common/utils.cpp
@@ -0,0 +1,143 @@
+/*
+ * 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 <time.h>
+
+#include <windows.h>
+
+#include <ignite/common/utils.h>
+
+namespace ignite
+{
+    namespace common
+    {
+        /**
+         * Check if string ends with the given ending.
+         *
+         * @param str String to check.
+         * @param ending Ending.
+         * @return Result.
+         */
+        inline bool StringEndsWith(const std::string& str, const std::string& ending)
+        {
+            if (str.length() > ending.length())
+                return str.compare(str.length() - ending.length(), ending.length(), ending) == 0;
+
+            return false;
+        }
+
+        time_t IgniteTimeGm(const tm& time)
+        {
+            tm tmc = time;
+
+            return _mkgmtime(&tmc);
+        }
+
+        time_t IgniteTimeLocal(const tm& time)
+        {
+            tm tmc = time;
+
+            return mktime(&tmc);
+        }
+
+        bool IgniteGmTime(time_t in, tm& out)
+        {
+            return gmtime_s(&out, &in) == 0;
+        }
+
+        bool IgniteLocalTime(time_t in, tm& out)
+        {
+            return localtime_s(&out, &in) == 0;
+        }
+
+        int LeadingZeroesForOctet(int8_t octet) {
+            if (octet == 0)
+                return 8;
+
+            int zeroes = 1;
+
+            if (octet >> 4 == 0) {
+                zeroes += 4;
+                octet <<= 4;
+            }
+
+            if (octet >> 6 == 0) {
+                zeroes += 2;
+                octet <<= 2;
+            }
+
+            zeroes -= octet >> 7;
+
+            return zeroes;
+        }
+
+        char* CopyChars(const char* val)
+        {
+            if (val) {
+                size_t len = strlen(val);
+                char* dest = new char[len + 1];
+                strcpy(dest, val);
+                *(dest + len) = 0;
+                return dest;
+            }
+            else
+                return NULL;
+        }
+
+        void ReleaseChars(char* val)
+        {
+            if (val)
+                delete[] val;
+        }
+
+        std::string GetEnv(const std::string& name, bool& found)
+        {
+            char res0[32767];
+
+            DWORD envRes = GetEnvironmentVariableA(name.c_str(), res0, 32767);
+
+            if (envRes != 0)
+            {
+                found = true;
+
+                return std::string(res0);
+            }
+            else 
+            {
+                found = false;
+
+                return std::string();
+            }
+        }
+
+        bool FileExists(const std::string& path)
+        {
+            WIN32_FIND_DATAA findres;
+
+            HANDLE hnd = FindFirstFileA(path.c_str(), &findres);
+
+            if (hnd == INVALID_HANDLE_VALUE)
+                return false;
+            else
+            {
+                FindClose(hnd);
+
+                return true;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/win/src/concurrent_os.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/win/src/concurrent_os.cpp b/modules/platforms/cpp/common/os/win/src/concurrent_os.cpp
deleted file mode 100644
index 676d8b6..0000000
--- a/modules/platforms/cpp/common/os/win/src/concurrent_os.cpp
+++ /dev/null
@@ -1,175 +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.
- */
-
-#include "ignite/common/concurrent_os.h"
-
-#pragma intrinsic(_InterlockedCompareExchange64)
-
-namespace ignite
-{
-    namespace common
-    {
-        namespace concurrent
-        {
-            /** Thread-local index for Windows. */
-            DWORD winTlsIdx;
-
-            void Memory::Fence() {
-                MemoryBarrier();
-            }
-
-            CriticalSection::CriticalSection() : hnd(new CRITICAL_SECTION) {
-                InitializeCriticalSection(hnd);
-
-                Memory::Fence();
-            }
-
-            CriticalSection::~CriticalSection() {
-                Memory::Fence();
-
-                delete hnd;
-            }
-
-            void CriticalSection::Enter() {
-                Memory::Fence();
-
-                EnterCriticalSection(hnd);
-            }
-
-            void CriticalSection::Leave() {
-                Memory::Fence();
-
-                LeaveCriticalSection(hnd);
-            }
-
-            SingleLatch::SingleLatch() : hnd(CreateEvent(NULL, TRUE, FALSE, NULL))
-            {
-                Memory::Fence();
-            }
-
-            SingleLatch::~SingleLatch()
-            {
-                Memory::Fence();
-
-                CloseHandle(hnd);
-            }
-
-            void SingleLatch::CountDown()
-            {
-                SetEvent(hnd);
-            }
-
-            void SingleLatch::Await()
-            {
-                WaitForSingleObject(hnd, INFINITE);
-            }
-
-            bool Atomics::CompareAndSet32(int32_t* ptr, int32_t expVal, int32_t newVal)
-            {
-                return CompareAndSet32Val(ptr, expVal, newVal) == expVal;
-            }
-
-            int32_t Atomics::CompareAndSet32Val(int32_t* ptr, int32_t expVal, int32_t newVal)
-            {
-                return InterlockedCompareExchange(reinterpret_cast<LONG*>(ptr), newVal, expVal);
-            }
-
-            int32_t Atomics::IncrementAndGet32(int32_t* ptr)
-            {
-                return InterlockedIncrement(reinterpret_cast<LONG*>(ptr));
-            }
-
-            int32_t Atomics::DecrementAndGet32(int32_t* ptr)
-            {
-                return InterlockedDecrement(reinterpret_cast<LONG*>(ptr));
-            }
-
-            bool Atomics::CompareAndSet64(int64_t* ptr, int64_t expVal, int64_t newVal)
-            {
-                return CompareAndSet64Val(ptr, expVal, newVal) == expVal;
-            }
-
-            int64_t Atomics::CompareAndSet64Val(int64_t* ptr, int64_t expVal, int64_t newVal)
-            {
-                return _InterlockedCompareExchange64(reinterpret_cast<LONG64*>(ptr), newVal, expVal);
-            }
-
-            int64_t Atomics::IncrementAndGet64(int64_t* ptr)
-            {
-#ifdef _WIN64
-                return InterlockedIncrement64(reinterpret_cast<LONG64*>(ptr));
-#else 
-                while (true)
-                {
-                    int64_t expVal = *ptr;
-                    int64_t newVal = expVal + 1;
-
-                    if (CompareAndSet64(ptr, expVal, newVal))
-                        return newVal;
-                }
-#endif
-            }
-
-            int64_t Atomics::DecrementAndGet64(int64_t* ptr)
-            {
-#ifdef _WIN64
-                return InterlockedDecrement64(reinterpret_cast<LONG64*>(ptr));
-#else 
-                while (true)
-                {
-                    int64_t expVal = *ptr;
-                    int64_t newVal = expVal - 1;
-
-                    if (CompareAndSet64(ptr, expVal, newVal))
-                        return newVal;
-                }
-#endif
-            }
-            
-            bool ThreadLocal::OnProcessAttach()
-            {
-                return (winTlsIdx = TlsAlloc()) != TLS_OUT_OF_INDEXES;
-            }
-
-            void ThreadLocal::OnThreadDetach()
-            {
-                if (winTlsIdx != TLS_OUT_OF_INDEXES)
-                {
-                    void* mapPtr = Get0();
-
-                    Clear0(mapPtr);
-                }
-            }
-
-            void ThreadLocal::OnProcessDetach()
-            {
-                if (winTlsIdx != TLS_OUT_OF_INDEXES)
-                    TlsFree(winTlsIdx);
-            }
-
-            void* ThreadLocal::Get0()
-            {
-                return TlsGetValue(winTlsIdx);
-            }
-
-            void ThreadLocal::Set0(void* ptr)
-            {
-                TlsSetValue(winTlsIdx, ptr);
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/os/win/src/utils.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/os/win/src/utils.cpp b/modules/platforms/cpp/common/os/win/src/utils.cpp
deleted file mode 100644
index 13aede3..0000000
--- a/modules/platforms/cpp/common/os/win/src/utils.cpp
+++ /dev/null
@@ -1,500 +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.
- */
-
-#include <windows.h>
-
-#include <time.h>
-
-#include <ignite/common/utils.h>
-
-namespace ignite
-{
-    namespace common
-    {
-        namespace utils
-        {
-            const char* JAVA_HOME = "JAVA_HOME";
-            const char* JAVA_DLL = "\\jre\\bin\\server\\jvm.dll";
-
-            const char* IGNITE_HOME = "IGNITE_HOME";
-
-            const char* PROBE_BIN = "\\bin";
-            const char* PROBE_EXAMPLES = "\\examples";
-
-            const char* IGNITE_NATIVE_TEST_CLASSPATH = "IGNITE_NATIVE_TEST_CLASSPATH";
-
-            /**
-             * Helper method to set boolean result to reference with proper NULL-check.
-             *
-             * @param res Result.
-             * @param outRes Where to set the result.
-             */
-            inline void SetBoolResult(bool res, bool* outRes)
-            {
-                if (outRes)
-                    *outRes = res;
-            }
-
-            /**
-             * Check if string ends with the given ending.
-             *
-             * @param str String to check.
-             * @param ending Ending.
-             * @return Result.
-             */
-            inline bool StringEndsWith(const std::string& str, const std::string& ending)
-            {
-                if (str.length() > ending.length())
-                    return str.compare(str.length() - ending.length(), ending.length(), ending) == 0;
-
-                return false;
-            }
-                
-            /**
-             * Helper function for GG home resolution. Checks whether certain folders
-             * exist in the path. Optionally goes upwards in directory hierarchy.
-             *
-             * @param path Path to evaluate.
-             * @param up Whether to go upwards.
-             * @res Resolution result.
-             * @return Resolved directory.
-             */
-            std::string ResolveIgniteHome0(const std::string& path, bool up, bool* res)
-            {
-                DWORD attrs = GetFileAttributesA(path.c_str());
-
-                if (attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY))
-                {
-                    // Remove trailing slashes, otherwise we will have an infinite loop.
-                    std::string path0 = path;
-
-                    while (true) {
-                        char lastChar = *path0.rbegin();
-
-                        if (lastChar == '/' || lastChar == '\\' || lastChar == ' ') {
-                            size_t off = path0.find_last_of(lastChar);
-
-                            path0.erase(off, 1);
-                        }
-                        else
-                            break;
-                    }
-
-                    std::string binStr = path0 + PROBE_BIN;
-                    DWORD binAttrs = GetFileAttributesA(binStr.c_str());
-
-                    std::string examplesStr = path0 + PROBE_EXAMPLES;
-                    DWORD examplesAttrs = GetFileAttributesA(examplesStr.c_str());
-
-                    if (binAttrs != INVALID_FILE_ATTRIBUTES && (binAttrs & FILE_ATTRIBUTE_DIRECTORY) &&
-                        examplesAttrs != INVALID_FILE_ATTRIBUTES && (examplesAttrs & FILE_ATTRIBUTE_DIRECTORY))
-                    {
-                        SetBoolResult(true, res);
-                        return std::string(path0);
-                    }
-
-                    if (up)
-                    {
-                        // Evaluate parent directory.
-                        size_t slashPos = path0.find_last_of("/\\");
-
-                        if (slashPos != std::string::npos)
-                        {
-                            std::string parent = path0.substr(0, slashPos);
-
-                            return ResolveIgniteHome0(parent, true, res);
-                        }
-                    }
-                }
-
-                SetBoolResult(false, res);
-
-                return std::string();
-            }
-
-            /**
-             * Create classpath picking JARs from the given path.
-             *
-             * @path Path.
-             * @return Classpath;
-             */
-            std::string ClasspathJars(const std::string& path)
-            {
-                std::string searchPath = path + "\\*.jar";
-
-                std::string res = std::string();
-
-                WIN32_FIND_DATAA findData;
-
-                HANDLE hnd = FindFirstFileA(searchPath.c_str(), &findData);
-
-                if (hnd != INVALID_HANDLE_VALUE)
-                {
-                    do
-                    {
-                        res.append(path);
-                        res.append("\\");
-                        res.append(findData.cFileName);
-                        res.append(";");
-                    } while (FindNextFileA(hnd, &findData) != 0);
-
-                    FindClose(hnd);
-                }
-
-                return res;
-            }
-
-            /**
-             * Create classpath picking compiled classes from the given path.
-             *
-             * @path Path.
-             * @return Classpath;
-             */
-            std::string ClasspathExploded(const std::string& path, bool down)
-            {
-                std::string res;
-
-                if (FileExists(path))
-                {
-                    // 1. Append "target\classes".
-                    std::string classesPath = path + "\\target\\classes";
-
-                    if (FileExists(classesPath)) {
-                        res.append(classesPath);
-                        res.append(";");
-                    }
-
-                    // 2. Append "target\test-classes"
-                    std::string testClassesPath = path + "\\target\\test-classes";
-
-                    if (FileExists(testClassesPath)) {
-                        res.append(testClassesPath);
-                        res.append(";");
-                    }
-
-                    // 3. Append "target\libs"
-                    std::string libsPath = path + "\\target\\libs";
-
-                    if (FileExists(libsPath)) {
-                        std::string libsCp = ClasspathJars(libsPath);
-                        res.append(libsCp);
-                    }
-
-                    // 4. Do the same for child if needed.
-                    if (down)
-                    {
-                        std::string searchPath = path + "\\*";
-
-                        WIN32_FIND_DATAA findData;
-
-                        HANDLE hnd = FindFirstFileA(searchPath.c_str(), &findData);
-
-                        if (hnd != INVALID_HANDLE_VALUE)
-                        {
-                            do
-                            {
-                                if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
-                                {
-                                    std::string childPath = findData.cFileName;
-
-                                    if (childPath.compare(".") != 0 &&
-                                        childPath.compare("..") != 0)
-                                    {
-                                        std::string childCp =
-                                            ClasspathExploded(path + "\\" + childPath, false);
-
-                                        res.append(childCp);
-                                    }
-                                }
-                            } while (FindNextFileA(hnd, &findData) != 0);
-
-                            FindClose(hnd);
-                        }
-                    }
-                }
-
-                return res;
-            }
-
-            /**
-             * Helper function to create classpath based on Ignite home directory.
-             *
-             * @param home Home directory; expected to be valid.
-             * @param forceTest Force test classpath.
-             */
-            std::string CreateIgniteHomeClasspath(const std::string& home, bool forceTest)
-            {
-                std::string res = std::string();
-
-                // 1. Add exploded test directories.
-                if (forceTest)
-                {
-                    std::string examplesPath = home + "\\examples";
-                    std::string examplesCp = ClasspathExploded(examplesPath, true);
-                    res.append(examplesCp);
-
-                    std::string modulesPath = home + "\\modules";
-                    std::string modulesCp = ClasspathExploded(modulesPath, true);
-                    res.append(modulesCp);
-                }
-
-                // 2. Add regular jars from "libs" folder excluding "optional".
-                std::string libsPath = home + "\\libs";
-
-                if (FileExists(libsPath))
-                {
-                    res.append(ClasspathJars(libsPath));
-
-                    // Append inner directories.
-                    std::string libsSearchPath = libsPath + "\\*";
-
-                    WIN32_FIND_DATAA libsFindData;
-
-                    HANDLE libsHnd = FindFirstFileA(libsSearchPath.c_str(), &libsFindData);
-
-                    if (libsHnd != INVALID_HANDLE_VALUE)
-                    {
-                        do
-                        {
-                            if (libsFindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
-                            {
-                                std::string libsChildPath = libsFindData.cFileName;
-
-                                if (libsChildPath.compare(".") != 0 &&
-                                    libsChildPath.compare("..") != 0 &&
-                                    libsChildPath.compare("optional") != 0) {
-                                    std::string libsFolder = libsPath + "\\" + libsChildPath;
-
-                                    res.append(ClasspathJars(libsFolder));
-                                }
-                            }
-                        } while (FindNextFileA(libsHnd, &libsFindData) != 0);
-
-                        FindClose(libsHnd);
-                    }
-                }
-
-                // 3. Return.
-                return res;
-            }
-
-            time_t IgniteTimeGm(const tm& time)
-            {
-                tm tmc = time;
-
-                return _mkgmtime(&tmc);
-            }
-
-            time_t IgniteTimeLocal(const tm& time)
-            {
-                tm tmc = time;
-
-                return mktime(&tmc);
-            }
-
-            bool IgniteGmTime(time_t in, tm& out)
-            {
-                return gmtime_s(&out, &in) == 0;
-            }
-
-            bool IgniteLocalTime(time_t in, tm& out)
-            {
-                return localtime_s(&out, &in) == 0;
-            }
-
-            int LeadingZeroesForOctet(int8_t octet) {
-                if (octet == 0)
-                    return 8;
-
-                int zeroes = 1;
-
-                if (octet >> 4 == 0) {
-                    zeroes += 4;
-                    octet <<= 4;
-                }
-
-                if (octet >> 6 == 0) {
-                    zeroes += 2;
-                    octet <<= 2;
-                }
-
-                zeroes -= octet >> 7;
-
-                return zeroes;
-            }
-
-            char* CopyChars(const char* val)
-            {
-                if (val) {
-                    size_t len = strlen(val);
-                    char* dest = new char[len + 1];
-                    strcpy(dest, val);
-                    *(dest + len) = 0;
-                    return dest;
-                }
-                else
-                    return NULL;
-            }
-
-            void ReleaseChars(char* val)
-            {
-                if (val)
-                    delete[] val;
-            }
-
-            std::string GetEnv(const std::string& name, bool* found)
-            {
-                char res0[32767];
-
-                DWORD envRes = GetEnvironmentVariableA(name.c_str(), res0, 32767);
-
-                if (envRes != 0)
-                {
-                    SetBoolResult(true, found);
-
-                    return std::string(res0);
-                }
-                else 
-                {
-                    SetBoolResult(false, found);
-
-                    return std::string();
-                }
-            }
-
-            bool FileExists(const std::string& path)
-            {
-                WIN32_FIND_DATAA findres;
-
-                HANDLE hnd = FindFirstFileA(path.c_str(), &findres);
-
-                if (hnd == INVALID_HANDLE_VALUE)
-                    return false;
-                else
-                {
-                    FindClose(hnd);
-
-                    return true;
-                }
-            }
-
-            std::string FindJvmLibrary(const std::string* path, bool* found)
-            {
-                SetBoolResult(true, found); // Optimistically assume that we will find it.
-
-                if (path) {
-                    // If path is provided explicitly, then check only it.
-                    if (FileExists(*path))                            
-                        return std::string(path->data());
-                }
-                else
-                {
-                    bool javaEnvFound;
-                    std::string javaEnv = GetEnv(JAVA_HOME, &javaEnvFound);
-
-                    if (javaEnvFound)
-                    {
-                        std::string javaDll = javaEnv + JAVA_DLL;
-
-                        if (FileExists(javaDll))
-                            return std::string(javaDll);
-                    }
-                }
-
-                *found = false; 
-
-                return std::string();
-            }
-
-            bool LoadJvmLibrary(const std::string& path)
-            {
-                HMODULE mod = LoadLibraryA(path.c_str());
-
-                return mod != NULL;
-            }                
-
-            std::string ResolveIgniteHome(const std::string* path, bool* found)
-            {
-                if (path)
-                    // 1. Check passed argument.
-                    return ResolveIgniteHome0(*path, false, found);
-                else
-                {
-                    // 2. Check environment variable.
-                    bool envFound;
-                    std::string env = GetEnv(IGNITE_HOME, &envFound);
-
-                    if (envFound)
-                        return ResolveIgniteHome0(env, false, found);
-
-                    // 3. Check current work dir.
-                    const DWORD curDirLen = GetCurrentDirectory(0, NULL);
-                        
-                    char* curDir = new char[curDirLen];
-
-                    GetCurrentDirectoryA(curDirLen, curDir);
-
-                    std::string curDirStr = curDir;
-
-                    delete[] curDir;
-
-                    return ResolveIgniteHome0(curDirStr, true, found);
-                }
-            }
-
-            std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home)
-            {
-                bool forceTest = false;
-
-                if (home)
-                {
-                    bool envFound;
-                    std::string env = GetEnv(IGNITE_NATIVE_TEST_CLASSPATH, &envFound);
-
-                    forceTest = envFound && env.compare("true") == 0;
-                }
-
-                return CreateIgniteClasspath(usrCp, home, forceTest);
-            }
-
-            std::string CreateIgniteClasspath(const std::string* usrCp, const std::string* home, bool forceTest)
-            {
-                // 1. Append user classpath if it exists.
-                std::string cp = std::string();
-
-                if (usrCp)
-                {
-                    cp.append(*usrCp);
-
-                    if (*cp.rbegin() != ';')
-                        cp.append(";");
-                }
-
-                // 2. Append home classpath if home is defined.
-                if (home)
-                {
-                    std::string homeCp = CreateIgniteHomeClasspath(*home, forceTest);
-
-                    cp.append(homeCp);
-                }
-
-                // 3. Return.
-                return cp;
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/project/vs/common.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/project/vs/common.vcxproj b/modules/platforms/cpp/common/project/vs/common.vcxproj
index 9bc23c2..67f01ff 100644
--- a/modules/platforms/cpp/common/project/vs/common.vcxproj
+++ b/modules/platforms/cpp/common/project/vs/common.vcxproj
@@ -19,32 +19,32 @@
     </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{4F7E4917-4612-4B96-9838-025711ADE391}</ProjectGuid>
+    <ProjectGuid>{B63F2E01-5157-4719-8491-0E1C7CD3B701}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>common</RootNamespace>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>StaticLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <PlatformToolset>v100</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>StaticLibrary</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <PlatformToolset>v100</PlatformToolset>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>StaticLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
     <PlatformToolset>v100</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <ConfigurationType>StaticLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
     <PlatformToolset>v100</PlatformToolset>
     <WholeProgramOptimization>true</WholeProgramOptimization>
@@ -96,15 +96,11 @@
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IGNITEJVM_EXPORTS;_CRT_SECURE_NO_WARNINGS;IGNITE_IMPL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>$(JAVA_HOME)\lib\jvm.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>$(JAVA_HOME)\lib\jvm.lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <DelayLoadDLLs>jvm.dll</DelayLoadDLLs>
-      <ModuleDefinitionFile>module.def</ModuleDefinitionFile>
       <OptimizeReferences>false</OptimizeReferences>
       <EnableCOMDATFolding>false</EnableCOMDATFolding>
       <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
@@ -114,19 +110,15 @@
     <ClCompile>
       <WarningLevel>Level3</WarningLevel>
       <SDLCheck>false</SDLCheck>
-      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IGNITEJVM_EXPORTS;_CRT_SECURE_NO_WARNINGS;IGNITE_IMPL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     </ClCompile>
     <Link>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalLibraryDirectories>$(JAVA_HOME)\lib\jvm.lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <AdditionalDependencies>$(JAVA_HOME)\lib\jvm.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <DelayLoadDLLs>jvm.dll</DelayLoadDLLs>
       <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
-      <ModuleDefinitionFile>module.def</ModuleDefinitionFile>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -137,7 +129,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IGNITEJVM_EXPORTS;_CRT_SECURE_NO_WARNINGS;IGNITE_IMPL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <OmitFramePointers>true</OmitFramePointers>
@@ -149,10 +141,6 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>$(JAVA_HOME)\lib\jvm.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>$(JAVA_HOME)\lib\jvm.lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <DelayLoadDLLs>jvm.dll</DelayLoadDLLs>
-      <ModuleDefinitionFile>module.def</ModuleDefinitionFile>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -162,7 +150,7 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <SDLCheck>false</SDLCheck>
-      <AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir)\..\..\include;$(ProjectDir)\..\..\os\win\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <OmitFramePointers>true</OmitFramePointers>
@@ -174,35 +162,29 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalLibraryDirectories>$(JAVA_HOME)\lib\jvm.lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <AdditionalDependencies>$(JAVA_HOME)\lib\jvm.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <DelayLoadDLLs>jvm.dll</DelayLoadDLLs>
-      <ModuleDefinitionFile>module.def</ModuleDefinitionFile>
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClInclude Include="..\..\include\ignite\common\concurrent.h" />
-    <ClInclude Include="..\..\include\ignite\common\exports.h" />
-    <ClInclude Include="..\..\include\ignite\common\ignite_error.h" />
-    <ClInclude Include="..\..\include\ignite\common\java.h" />
     <ClInclude Include="..\..\include\ignite\common\utils.h" />
+    <ClInclude Include="..\..\include\ignite\date.h" />
+    <ClInclude Include="..\..\include\ignite\guid.h" />
+    <ClInclude Include="..\..\include\ignite\ignite_error.h" />
+    <ClInclude Include="..\..\include\ignite\timestamp.h" />
     <ClInclude Include="..\..\os\win\include\ignite\common\common.h" />
     <ClInclude Include="..\..\os\win\include\ignite\common\concurrent_os.h" />
     <ClInclude Include="targetver.h" />
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\..\os\win\src\common.cpp" />
-    <ClCompile Include="..\..\os\win\src\concurrent_os.cpp" />
-    <ClCompile Include="..\..\os\win\src\utils.cpp" />
-    <ClCompile Include="..\..\src\concurrent.cpp" />
-    <ClCompile Include="..\..\src\exports.cpp" />
+    <ClCompile Include="..\..\os\win\src\common\concurrent_os.cpp" />
+    <ClCompile Include="..\..\os\win\src\common\utils.cpp" />
+    <ClCompile Include="..\..\src\common\concurrent.cpp" />
+    <ClCompile Include="..\..\src\date.cpp" />
+    <ClCompile Include="..\..\src\guid.cpp" />
     <ClCompile Include="..\..\src\ignite_error.cpp" />
-    <ClCompile Include="..\..\src\java.cpp" />
+    <ClCompile Include="..\..\src\timestamp.cpp" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-  <ItemGroup>
-    <None Include="module.def" />
-  </ItemGroup>
 </Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/project/vs/common.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/project/vs/common.vcxproj.filters b/modules/platforms/cpp/common/project/vs/common.vcxproj.filters
index fd55d84..1a6f069 100644
--- a/modules/platforms/cpp/common/project/vs/common.vcxproj.filters
+++ b/modules/platforms/cpp/common/project/vs/common.vcxproj.filters
@@ -8,59 +8,60 @@
       <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
       <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
     </Filter>
+    <Filter Include="Code\common">
+      <UniqueIdentifier>{9d664b8a-3a09-460b-9d53-c1a7f08217c0}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
+    <ClInclude Include="targetver.h">
+      <Filter>Misc</Filter>
+    </ClInclude>
     <ClInclude Include="..\..\os\win\include\ignite\common\common.h">
-      <Filter>Code</Filter>
+      <Filter>Code\common</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\os\win\include\ignite\common\concurrent_os.h">
-      <Filter>Code</Filter>
+    <ClInclude Include="..\..\include\ignite\common\concurrent.h">
+      <Filter>Code\common</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\ignite\common\exports.h">
-      <Filter>Code</Filter>
+    <ClInclude Include="..\..\include\ignite\common\utils.h">
+      <Filter>Code\common</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\ignite\common\java.h">
-      <Filter>Code</Filter>
+    <ClInclude Include="..\..\os\win\include\ignite\common\concurrent_os.h">
+      <Filter>Code\common</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\ignite\common\concurrent.h">
+    <ClInclude Include="..\..\include\ignite\date.h">
       <Filter>Code</Filter>
     </ClInclude>
-    <ClInclude Include="targetver.h">
-      <Filter>Misc</Filter>
+    <ClInclude Include="..\..\include\ignite\guid.h">
+      <Filter>Code</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\ignite\common\utils.h">
+    <ClInclude Include="..\..\include\ignite\timestamp.h">
       <Filter>Code</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\ignite\common\ignite_error.h">
+    <ClInclude Include="..\..\include\ignite\ignite_error.h">
       <Filter>Code</Filter>
     </ClInclude>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\..\os\win\src\common.cpp">
+    <ClCompile Include="..\..\src\date.cpp">
       <Filter>Code</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\concurrent.cpp">
+    <ClCompile Include="..\..\src\guid.cpp">
       <Filter>Code</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\os\win\src\concurrent_os.cpp">
+    <ClCompile Include="..\..\src\timestamp.cpp">
       <Filter>Code</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\exports.cpp">
-      <Filter>Code</Filter>
+    <ClCompile Include="..\..\os\win\src\common\concurrent_os.cpp">
+      <Filter>Code\common</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\java.cpp">
-      <Filter>Code</Filter>
+    <ClCompile Include="..\..\os\win\src\common\utils.cpp">
+      <Filter>Code\common</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\ignite_error.cpp">
-      <Filter>Code</Filter>
+    <ClCompile Include="..\..\src\common\concurrent.cpp">
+      <Filter>Code\common</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\os\win\src\utils.cpp">
+    <ClCompile Include="..\..\src\ignite_error.cpp">
       <Filter>Code</Filter>
     </ClCompile>
   </ItemGroup>
-  <ItemGroup>
-    <None Include="module.def">
-      <Filter>Misc</Filter>
-    </None>
-  </ItemGroup>
 </Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cca0be5/modules/platforms/cpp/common/project/vs/module.def
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/project/vs/module.def b/modules/platforms/cpp/common/project/vs/module.def
deleted file mode 100644
index 21a4994..0000000
--- a/modules/platforms/cpp/common/project/vs/module.def
+++ /dev/null
@@ -1,132 +0,0 @@
-LIBRARY ignite.common.dll
-EXPORTS
-IgniteReallocate @1 
-IgniteIgnitionStart @2 
-IgniteIgnitionInstance @3 
-IgniteIgnitionEnvironmentPointer @4 
-IgniteIgnitionStop @5 
-IgniteIgnitionStopAll @6 
-IgniteTargetOutLong @7
-IgniteProcessorReleaseStart @8 
-IgniteProcessorProjection @9 
-IgniteProcessorCache @10 
-IgniteProcessorCreateCache @11 
-IgniteProcessorGetOrCreateCache @12 
-IgniteProcessorAffinity @13 
-IgniteProcessorDataStreamer @14 
-IgniteProcessorTransactions @15 
-IgniteProcessorServices @16
-IgniteTargetInStreamOutObject @17 
-IgniteTargetInStreamOutLong @18 
-IgniteTargetOutStream @19 
-IgniteTargetInStreamOutStream @20 
-IgniteTargetInObjectStreamOutStream @21 
-IgniteTargetListenFuture @22 
-IgniteTargetListenFutureForOperation @23 
-IgniteAffinityPartitions @24 
-IgniteCacheWithSkipStore @25 
-IgniteCacheWithNoRetries @26 
-IgniteCacheWithExpiryPolicy @27 
-IgniteCacheWithAsync @28 
-IgniteCacheWithKeepPortable @29 
-IgniteCacheClear @30 
-IgniteCacheRemoveAll @31 
-IgniteCacheOutOpQueryCursor @32 
-IgniteCacheOutOpContinuousQuery @33 
-IgniteCacheIterator @34 
-IgniteCacheLocalIterator @35 
-IgniteCacheEnterLock @36 
-IgniteCacheExitLock @37 
-IgniteCacheTryEnterLock @38 
-IgniteCacheCloseLock @39 
-IgniteCacheRebalance @40 
-IgniteCacheSize @41 
-IgniteCacheStoreCallbackInvoke @42 
-IgniteComputeWithNoFailover @43 
-IgniteComputeWithTimeout @44 
-IgniteComputeExecuteNative @45 
-IgniteContinuousQueryClose @46 
-IgniteContinuousQueryGetInitialQueryCursor @47 
-IgniteDataStreamerListenTopology @48 
-IgniteDataStreamerAllowOverwriteGet @49 
-IgniteDataStreamerAllowOverwriteSet @50 
-IgniteDataStreamerSkipStoreGet @51 
-IgniteDataStreamerSkipStoreSet @52 
-IgniteDataStreamerPerNodeBufferSizeGet @53 
-IgniteDataStreamerPerNodeBufferSizeSet @54 
-IgniteDataStreamerPerNodeParallelOperationsGet @55 
-IgniteDataStreamerPerNodeParallelOperationsSet @56 
-IgniteMessagingWithAsync @57 
-IgniteProjectionForOthers @58 
-IgniteProjectionForRemotes @59 
-IgniteProjectionForDaemons @60 
-IgniteProjectionForRandom @61 
-IgniteProjectionForOldest @62 
-IgniteProjectionForYoungest @63 
-IgniteProcessorCompute @64 
-IgniteProcessorMessage @65 
-IgniteProcessorEvents @66 
-IgniteProjectionResetMetrics @67 
-IgniteProjectionOutOpRet @68 
-IgniteQueryCursorIterator @69 
-IgniteQueryCursorClose @70 
-IgniteTransactionsStart @71 
-IgniteTransactionsCommit @72 
-IgniteTransactionsCommitAsync @73 
-IgniteTransactionsRollback @74 
-IgniteTransactionsRollbackAsync @75 
-IgniteTransactionsClose @76 
-IgniteTransactionsState @77 
-IgniteTransactionsSetRollbackOnly @78 
-IgniteTransactionsResetMetrics @79 
-IgniteAcquire @80 
-IgniteRelease @81 
-IgniteThrowToJava @82 
-IgniteHandlersSize @83 
-IgniteCreateContext @84 
-IgniteDeleteContext @85 
-IgniteDestroyJvm @86 
-IgniteEventsWithAsync @87 
-IgniteEventsStopLocalListen @88 
-IgniteEventsLocalListen @89 
-IgniteEventsIsEnabled @90 
-IgniteTargetOutObject @91 
-IgniteServicesWithAsync @92
-IgniteServicesWithServerKeepPortable @93
-IgniteServicesCancel @94
-IgniteServicesCancelAll @95
-IgniteServicesGetServiceProxy @96
-IgniteProcessorExtensions @97
-IgniteProcessorAtomicLong @98
-IgniteAtomicLongGet @99 
-IgniteAtomicLongIncrementAndGet @100 
-IgniteAtomicLongGetAndIncrement @101
-IgniteAtomicLongAddAndGet @102
-IgniteAtomicLongGetAndAdd @103
-IgniteAtomicLongDecrementAndGet @104
-IgniteAtomicLongGetAndDecrement @105
-IgniteAtomicLongGetAndSet @106
-IgniteAtomicLongCompareAndSetAndGet @107
-IgniteAtomicLongIsClosed @108
-IgniteAtomicLongClose @109
-IgniteListenableCancel @110
-IgniteListenableIsCancelled @111
-IgniteTargetListenFutureAndGet @112
-IgniteTargetListenFutureForOperationAndGet @113
-IgniteProcessorCreateCacheFromConfig @114
-IgniteProcessorGetOrCreateCacheFromConfig @115
-IgniteProcessorGetIgniteConfiguration @116
-IgniteProcessorDestroyCache @117
-IgniteProcessorAtomicSequence @118
-IgniteAtomicSequenceGet @119
-IgniteAtomicSequenceIncrementAndGet @120
-IgniteAtomicSequenceGetAndIncrement @121
-IgniteAtomicSequenceAddAndGet @122
-IgniteAtomicSequenceGetAndAdd @123
-IgniteAtomicSequenceGetBatchSize @124
-IgniteAtomicSequenceSetBatchSize @125
-IgniteAtomicSequenceIsClosed @126
-IgniteAtomicSequenceClose @127
-IgniteProcessorAtomicReference @128
-IgniteAtomicReferenceIsClosed @129
-IgniteAtomicReferenceClose @130


Mime
View raw message