Re: persistent java virtual machine under PHP

From: Date: Wed, 04 Dec 2002 14:46:10 +0000
Subject: Re: persistent java virtual machine under PHP
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-92069@lists.php.net to get a copy of this message
Ivan Ristic wrote:
I do not think that is possible, unless PHP engine itself is contained within a single process (and runs multithreaded). Which it isn't (under Apache 1.x & , at least).
I'm not familiar in general with the PHP engine, so my questions may be quite stupid. Anyway: How is a persistent database connection handled then? e.g. in the mysql module? looking at the mysql module source code, it seems that there is a list called persistent_list, used in such a manner: zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le would this provide some persistnece? If yes, how to use it exaclty? (I couldn't make it work myself.) It seems to me that libphp_java.so is unloaded every once in a while. For example, global static variable defined in the module get re-initialized every once in a while. Is this so? I can't see a call to JNI_DestroyJavaVM() anywhere in the java module source code. Isn't this a possible reason for resource leaks? Or are modules that cleverly unloaded? Akos

« previous php.dev (#92069) next »