On Wed, 4 Dec 2002, [ISO-8859-2] Maróy Ákos wrote:
> What happens is that the function jvm_create() gets called regularly
> when requesting new pages using the Java extension, from the function
> java_call_function_handler():
>
>    if (!JG(jenv)) jvm_create(TSRMLS_C);

Actually, the JVM is unloaded by php.  In the latest CVS the code from
destroy_jvm() has been removed that tried to dlclose() the JVM.  This was
done because it is impossible to dlclose() a JVM because DestroyJavaVM()
is broken in all JNI implementations.

It the code you reference JG(env) is a global variable that is the jenv of
the currently running JVM.  Of course a new JVM needs to be created by every
instance of PHP (so every httpd child in apache).  The code is misleading
because in past versions of PHP, the module tried to unload the JVM and load it
again every time a ini setting was changed.  This code should be removed
and jvm_create() should be instead placed in the PHP_MINIT() function, that
way the JVM will be loaded when apache is started instead of the first time
java() is used by PHP.  I'll get to it eventually unless someone beats me to
it.

-Tony


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to