jQuery in Action, 3rd edition
The moose likes Other JSE/JEE APIs and the fly likes JNI, C++ Callback-Function  in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JNI, C++ Callback-Function  in Tomcat" Watch "JNI, C++ Callback-Function  in Tomcat" New topic

JNI, C++ Callback-Function in Tomcat

Alexander Sohr

Joined: Jan 14, 2005
Posts: 1

I'm loading my DLL, which starts a timer. Then the DLL writes every 5secs new data with an Callback-Funtion into my Java-class. This all works fine, when i use the stuff in an Application or an Applet. But when i try the same from a Servlet in Tomcat Environment, the timer starts but the first Callback seems to spawn a new Thread in Tomcat and a ClassNotFountException occurs. I thought, that because of the new Thread the Java-Env.-Poiter is wrong. I tried to solve this by saving a Pointer to the JavaVM but that wasn't the trick. Maybe it is possible to tell Tomcat not to spawn an new Thread when the Jni Call happens?
Any other suggentions?
Thanks Alex
I agree. Here's the link: http://aspose.com/file-tools
subject: JNI, C++ Callback-Function in Tomcat
It's not a secret anymore!