Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JNI thread vs. native thread vs. JNI call

Reply
Thread Tools

JNI thread vs. native thread vs. JNI call

 
 
bgabrhelik bgabrhelik is offline
Junior Member
Join Date: Sep 2009
Posts: 1
 
      09-29-2009
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call Ruby from non-interpreter native thread? -= Ko =- Black Ninja Ruby 1 04-05-2011 07:31 AM
Call from native thread is not handled by context class loader lavanya.msra@gmail.com Java 0 08-24-2010 04:29 PM
jni native method indirect call of shmat returns invalid pointer jadrian@wi.rr.com Java 2 05-10-2007 09:21 PM
Java Native Interface: "Translate" java call to JNI ckirchho@directmedia.de Java 13 10-09-2006 04:52 PM
Call from attached thread in native code via JNI crashes. Why? RThaden@web.de Java 2 08-02-2006 07:06 AM



Advertisments