- Joined
- Sep 29, 2009
- Messages
- 1
- Reaction score
- 0
Dears,
I need to call from Java code subsequently native methods (JNI), but the requirement is that they are called in the same native thread. By native thread I mean the Operating System thread. Can I rely on that the JVM thread will be scheduled with the same native thread? Is it defined somehow? If not, cannot I ensure that by synchronizing of block of code?
The reason is that an API I want to call is Thread Local Storage sensitive. It is Windows impersonation. I would like to avoid duplicating of native methods in JNI - a typical and an impersonation version. Any thoughts and/or suggestions?
Thanks in advance
Bronislav Gabrhelik
I need to call from Java code subsequently native methods (JNI), but the requirement is that they are called in the same native thread. By native thread I mean the Operating System thread. Can I rely on that the JVM thread will be scheduled with the same native thread? Is it defined somehow? If not, cannot I ensure that by synchronizing of block of code?
The reason is that an API I want to call is Thread Local Storage sensitive. It is Windows impersonation. I would like to avoid duplicating of native methods in JNI - a typical and an impersonation version. Any thoughts and/or suggestions?
Thanks in advance
Bronislav Gabrhelik