Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JNI and JVMs

 
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: 42970
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!
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!