adamdebreceni commented on a change in pull request #1138:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1138#discussion_r708983346



##########
File path: extensions/jni/JNILoader.cpp
##########
@@ -15,16 +15,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "JNILoader.h"
 
-#include "core/FlowConfiguration.h"
+#include "core/extension/Extension.h"
+#include "JVMCreator.h"
 
-bool JNIFactory::added = 
core::FlowConfiguration::add_static_func("createJNIFactory");
+namespace minifi = org::apache::nifi::minifi;
 
-extern "C" {
+static minifi::jni::JVMCreator& getJVMCreator() {
+  static minifi::jni::JVMCreator instance("JVMCreator");
+  return instance;
+}
 
-void *createJNIFactory(void) {
-  return new JNIFactory();
+static bool init(const std::shared_ptr<org::apache::nifi::minifi::Configure>& 
config) {
+  getJVMCreator().configure(config);
+  return true;
 }
 
+static void deinit() {
+  // TODO(adebreceni)

Review comment:
       added some comment, it was not implemented before, and is outside the 
scope of this PR




-- 
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: issues-unsubscr...@nifi.apache.org

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


Reply via email to