Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Class Instantiation from C++, Is JNI thread safe

843829Feb 27 2003 — edited Mar 22 2003
In 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.


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2003
Added on Feb 27 2003
2 comments
521 views