Making JNIEnv a global reference
Hi All,
I have a class A in which I have a method m1() and a static method m2(). From m1() I invoke a native method nm1() passing refernce to the JNIEnv and other parameters. When there is a call to nm1(), the control goes to nm2 another native method. From nm2, I need to make a call back method on class A to invoke m2(). Please note that I cannot pass JNIEnv reference to nm2(). Can I make the incoming JNIEnv inside nm1() a global reference and access it from nm2()? Also note that i will only make use of JNIEnv and not the jObject in the nm2(). I know it works but would like to know what would be the impact in the multi threaded scenario.
Any inputs in this regard would be greatly apprciated.
Thanks,
Griish

