You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/11/01 23:07:18 UTC

[GitHub] [ignite] isapego commented on a change in pull request #9521: IGNITE-15806 CPP: Remove JNI module and move it to Core.

isapego commented on a change in pull request #9521:
URL: https://github.com/apache/ignite/pull/9521#discussion_r740584203



##########
File path: modules/platforms/cpp/core/CMakeLists.txt
##########
@@ -17,12 +17,15 @@
 
 project(ignite)
 
+find_library(JVM_LIBRARY jvm ${JAVA_JVM_LIBRARY_DIRECTORIES})
+
 include_directories(SYSTEM ${JNI_INCLUDE_DIRS})
 include_directories(include)
 
 set(TARGET ${PROJECT_NAME})
 
 set(SOURCES src/ignite.cpp
+		src/jni/java.cpp

Review comment:
       Whitespaces :)

##########
File path: modules/platforms/cpp/core/include/ignite/jni/utils.h
##########
@@ -124,8 +119,16 @@ namespace ignite
             }
 
         private:
+            /** Initializer */
+            void Init(const common::concurrent::SharedPointer<java::JniContext>& ctx0, jobject obj0) {
+                ctx = ctx0;
+
+                if (ctx.IsValid())
+                    this->obj = ctx.Get()->Acquire(obj0);
+            }
+
             /** Context. */
-            java::JniContext* ctx;
+            common::concurrent::SharedPointer<java::JniContext> ctx;

Review comment:
       Are you sure there is no cyclic reference? 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org