From: <php...@li...> - 2007-06-14 18:28:15
|
Thanks very much Jost. Your commitment is highly appreciated. Robert php...@li... wrote: > Hi, > > PHP/Java Bridge version 4.1.0 fixes this problem. > > Please use the following download link: > > http://sourceforge.net/project/downloading.php?group_id=117793&use_mirror=osdn&filename=php-java-bridge_4.1.0_j2ee.zip&15111070 > > Since version 4.1.0 the DynamicJavaBridgeClassLoader > is optional. When running in a shared web environment, > JavaBridge.jar and php-servlet.jar are loaded from the > global classpath, the PhpJavaServlet sets the > currentThreadContextClassLoader (wrapped by a > URLClassLoader, used to load libraries from > ~/lib/)into the ContextFactory and the ContextRunners > retrieve and use the appropriate ClassLoader. > > The DynamicJavaBridgeClassLoader is enabled only when > the procedure java_require() is called. The bridge > allocates a new instance of the > DynamicJavaBridgeClassLoader (with the current loader > as a delegate) and sets it into the > PhpJavaBridgeClassLoader. After the request is done, > the DynamicJavaBridgeClassLoader is thrown away. This > is necessary because the VM keeps a native cache which > is associated the instance of the > DynamicJavaBridgeClassLoader. -- Some Java VM's (IBM) > even crash, if we do dirty tricks to recycle the > instance for new requests (see documentation note in > DynamicClassLoader#copyInto). > > Furthermore the ContextFactory's have been cleaned up. > Both, the pure PHP- as well as the C implementation > now pass the current context ID via a protocol header > field, so that the ContextFactory can temporarily set > the correct JavaBridge instance for the current > connection (see option java.persistent_connections). > This means that most of the old "recycle" logic is now > obsolete and has been removed (it may be possible to > keep the old cruft, but it is ugly and very hard to > understand). > > Because of the above change, old php_java.dll or > java.so files < 4.1.0 will likely crash. For version > 4.1.1 I will add a compatibility option which simply > disables java.persistent_connections when the back end > detects an old protocol header. Until then please use > the pure PHP implementation ("Java.inc") instead. > > > Regards, > Jost Boekemeier |