Java Class Instantiation from C++, Is JNI thread safe
843829Feb 27 2003 — edited Mar 22 2003In my project I need to instantiate some Jave Obectjs for accessing the Performance counters for Web Server using the JNI in the C++ code. In my C++ application there are 7 threas which access pointer JNIEnv * p. I like to know that whether all JNI function avaiable in JNIEnv * are thread safe or not.
Currenly we are using the locking using the mutex, but thre is a performance issue.
Is locking is essential ? or Is there any alternate solution ?
We are using the Java 1.3 version. We need this to be on platforms Windows,HP,Solaris.
Pls help me.