note 40421 added to ref.java

From: Date: Wed, 03 Mar 2004 14:08:38 +0000
Subject: note 40421 added to ref.java
Groups: php.notes 
Request: Send a blank email to php-notes+get-66165@lists.php.net to get a copy of this message
The Java Servlet SAPI works fine in a non-threading environment. If you want to use threads (normal case) you have to do several things to get it work: - get the patched files from http://www.pelikan-it.com/download.html - replace the sapi/servlet/servlet.java and sapi/servlet/servlet.c file by the patched files - build the php like this ./configure --with-tsrm-pthreads \ --with-servlet=/opt/resin --with-java=/opt/java \ --prefix=/opt/php-4.3.4 The primary problem is, that the request and response objects are stored as global instance-variables of the servlet which will be overwritten by other threads invoking the servlet (remember: just on servlet-object for all threads!) and all crashes. I changed the servlet to pass the request and response objects to the java- and native-methods (where required) to prevent the problem. Once you have solved this problem it works fine and needs unlike the java-extension just one jvm. ---- Manual Page -- http://www.php.net/manual/en/ref.java.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40421 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40421&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40421&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66165) next »