Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JNI and JVMs  RSS feed

 
David Miranda
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Quick question (hopefully )

I am running a Weblogic Server - it has its own JVM. If one of the applications running on the Weblogic server calls native C code, will the native C code create its own JVM, effectively creating two JVMs?

If so,

Lets say three people use the application. The application servlet will supply one thread for each user, 3 threads. When hitting the native code, will the native C code create 3 JVMs?

Thanks!

David
[ November 04, 2005: Message edited by: David Miranda ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you'll only have one JVM. While it is possible to create a JVM inside C/C++ code, that ususally happens when C code calls Java code. Your situation is the other way around - you already have a JVM, and are calling C code. You may of course end up with multiple C processes running in parallel.
 
David Miranda
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes sense! Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!