Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNI, C++ Callback-Function in Tomcat

 
Alexander Sohr
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic