Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting java as a windows NT service versus at the command line?

Status
Not open for further replies.

laoise

Programmer
Jun 25, 2002
2
IE

HI,

I have written a servlet that uses JNI.
java version - jdk1.4.1_01

I am using IIS web server on WinNT with multiple Tomcat and JRun servlet containers. Each servlet container runs in its own jvm and each hosts a servlet that uses JNI to access the same dll.

I am observing differences in behaviour of my servlet when I start my web servlet container (JRun) as an Nt service and when I start it as an application. When it is started as a service, the servlet can load the dll (System call loadLibrary) but it seems to put a lock on the dll so no other jvm can access it. If I start the servlet container as an application, multiple jvms can load the same dll at the same time.

As an NT service, windows starts the jvm by loading jvm.dll and the OS controls the jvm. Starting the jvm at the command line using the java command seems to cause the jvm to behave differently. Initially I thought they uses different threading models (green v native) depending on how the jvm is started but this is not the case - since java 1.1, all jvms use the native threading model.

My question is - what are the main differences in starting the jvm at the command line and the OS starting the jvm by loading jvm.dll?

Many Thx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top