Hi,
I have a question regarding how the web server handles multiple jsp pages.
Question 1 :
------------
Is there just one process and multiple threads?
Is this the rule? Wouldn't there be a problem at times of high load?
Question 2:
-----------
I have a class which has a static variable. On first call, the static variable is initialised. After that, I don't. This works across JSP pages.
Can I depend on this behaviour? Are there any exceptions?
Thanks in advance!
Manoj Joseph
-
Server processes, static variables (2 messages)
- Posted by: Manoj Joseph
- Posted on: February 04 2003 07:48 EST
Threaded Messages (2)
- Server processes, static variables by nishit kamdar on February 05 2003 01:13 EST
- Server processes, static variables by Manoj Joseph on February 06 2003 04:46 EST
-
Server processes, static variables[ Go to top ]
- Posted by: nishit kamdar
- Posted on: February 05 2003 01:13 EST
- in response to Manoj Joseph
Question 1 :
------------
Is there just one process and multiple threads?
answer :
---------
if you are not implementing single thread model
it is one process & multiple threads...
no there want be any load issue .. infact if you are
going for single thread model .. there might be one..
answer-2:
---------
if you are using static or class level variables
you need to ensure thread safety otherwise
there might be an expected behaviour . -
Server processes, static variables[ Go to top ]
- Posted by: Manoj Joseph
- Posted on: February 06 2003 04:46 EST
- in response to nishit kamdar
if you are not implementing single thread model
> it is one process & multiple threads...
Let me get this straight. There is only one instance of the JVM - only one process no matter how many JSPs there might be. In other words, if I have N JSP pages, all of them are serviced by this process.
Did I get this correct?
Now my problem is, a process (on any OS) will have limits - max address space, files open... Wouldn't this be a problem? Does the JVM take care of managing these resources.
Could someone answer?
Regards,
Manoj