Hi Jost!
Sorry, I forgot to give you information about my environment:
32-bit Intel Machine
Windows XP + Service Pack 2
WAMP Version 1.6.5 which includes:
* Apache 2.0.59
* PHP 5.1.6 (Using Apache 2.0 Handler as Server API)
JDK 1.5.0.10
PHP-Java Bridge 3.2.1 J2EE
> I assume you mean the DynamicClassLoader. (DynamicLoad may also mean > that you start the bridge and the JVM as a sub component for each incoming
> request).
Yes, I meant the DynamicClassLoader.
> Do you start Java as a sub component of apache or IIS or as a separate
> component, for example via the Tomcat servlet engine?
I installed PHP-Java Bridge following instructions here:
TITLE: PHP5, PHP/Java Bridge & Apache on XP PRO + SP2 and examples
URL: http://www.dsl.uow.edu.au/~sk33/php5java.htm
In that setup, I suppose I start Java as a sub component of Apache (?).
>> 3) The system loads the Java Virtual Machine (JVM).
> Only if the JVM is running as a sub component of Apache ... AND if Apache ... > cannot maintain a pool of PHP instances, which is usually the case with CGI.
> (emphasis mine -- Filip)
You mention two conditions:
1) the JVM is running as a sub component of Apache
The answer appears to be YES.
2) Apache cannot maintain a pool of PHP instances, which is usually the case with CGI
I don't use CGI. Does that automatically mean my Apache can maintain a pool of instances?
If that is the case (i.e. the second condition is not met), then the system SHOULD NOT be loading the JVM every time a user requests for a PHP script.
>> 4) The system loads all Java libraries needed by the PHP script.
> Only if the JVM is running as a sub component OR Apache/IIS and PHP is
> running in CGI mode. (emphasis mine -- Filip)
Only if the JVM is running as a sub component --- TRUE
Apache/IIS and PHP is running in CGI mode --- FALSE
TRUE or FALSE = TRUE, the system does load all Java libraries needed (e.g. log4j, dom4j, etc.) per request unless they're already in the cache (?)
>> What happens exactly with "static loading"? Is this sequence of events accurate?
>>
>> 0) User starts up the welcome page of a web application.
>> The system loads all Java base classes (libraries) AND
>> the Java Virtual Machine (JVM).
> Well, the JVM is usually started as a separate component. Or in the MINIT
> method invoked during the startup of Apache or IIS. This means that one VM
> is usually attached to the web server.
So do you think this is the solution to my problem (slow loading per request, esp. the first)?
> The only exception are CGI or console scripts.
By 'console scripts', do you mean command line scripting (that doesn't use a web server)?
Thanks again!
Filip
Send instant messages to your online friends http://uk.messenger.yahoo.com
|