You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(19) |
Feb
(15) |
Mar
(10) |
Apr
(8) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(31) |
Sep
(111) |
Oct
(52) |
Nov
(72) |
Dec
(42) |
2006 |
Jan
(21) |
Feb
(32) |
Mar
(33) |
Apr
(24) |
May
(15) |
Jun
(40) |
Jul
(32) |
Aug
(19) |
Sep
(38) |
Oct
(37) |
Nov
(63) |
Dec
(37) |
2007 |
Jan
(18) |
Feb
(39) |
Mar
(69) |
Apr
(49) |
May
(71) |
Jun
(59) |
Jul
(71) |
Aug
(85) |
Sep
(46) |
Oct
(14) |
Nov
(25) |
Dec
(56) |
2008 |
Jan
(24) |
Feb
(77) |
Mar
(104) |
Apr
(44) |
May
(41) |
Jun
(11) |
Jul
(31) |
Aug
(59) |
Sep
(44) |
Oct
(86) |
Nov
(66) |
Dec
(93) |
2009 |
Jan
(88) |
Feb
(41) |
Mar
(49) |
Apr
(135) |
May
(22) |
Jun
(31) |
Jul
(60) |
Aug
(71) |
Sep
(76) |
Oct
(18) |
Nov
(52) |
Dec
(20) |
2010 |
Jan
(8) |
Feb
(50) |
Mar
(35) |
Apr
(48) |
May
(46) |
Jun
(84) |
Jul
(38) |
Aug
(61) |
Sep
(51) |
Oct
(31) |
Nov
(17) |
Dec
(18) |
2011 |
Jan
(51) |
Feb
(14) |
Mar
(17) |
Apr
(23) |
May
(15) |
Jun
(11) |
Jul
(5) |
Aug
(5) |
Sep
(15) |
Oct
(8) |
Nov
(5) |
Dec
(25) |
2012 |
Jan
(2) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(27) |
Jun
(32) |
Jul
(36) |
Aug
(10) |
Sep
(16) |
Oct
(3) |
Nov
(13) |
Dec
(7) |
2013 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
(6) |
Feb
|
Mar
|
Apr
(10) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2018 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jost B. <jos...@ya...> - 2005-01-05 18:40:51
|
> You will see that instead of special chars like "ąść" there is "?". > UTF-8 should work ? Yes, of course. See attached png. But note that your OS must support UTF-8. For example: bash-2.05b$ echo $LANG de_DE.UTF-8 > $baseFont = new Java("com.lowagie.text.pdf.BaseFont"); > public static final boolean EMBEDDED = true; Yes, I see the problem. The spec says that bean properties are examined first. Which means that we have to call the method BaseFont.isEmbedded(), which will return the protected variable embedded. This is a) not what you want and b) does not work because baseFont is a class, not an instance. JSR 223 currently has the same problem. I think it is necessary to check for a real variable first, only if that fails we should call the property method. I check this against the current spec and will decide when I am back from vacation in three weeks. BTW: Of course, the new Java(...BaseFont) code above should throw an exception "class is abstract" instead of silently returning the class instead of the instance. This is one of the problems the bridge has inherited from the original php4 ext/java written by Sam Ruby. This will change with the 2.x versions, when we switch to the JSR code. Jost |
From: Jost B. <jos...@ya...> - 2005-01-02 19:21:13
|
> /usr/local/jdk1.5.0 > protocol.h:11:17: jni.h: No such file or directory Yes. This is a problem with the autoconf script: "find" does not following symlinks, so the incline does not find the include directories: PHP_EVAL_INCLINE(`for i in \`find $PHP_JAVA/include -type d -print\`; do echo -n "-I$i "; done`) I will fix this bug for the version 1.0.8, which will be available at the end of this month. Until then please invoke make as follows: make "CFLAGS=-I/usr/local/jdk1.5.0/include -I/usr/local/jdk1.5.0/include/linux" Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-01-02 19:06:08
|
http://php-java-bridge.sourceforge.net/php-java-bridge_1.0.8-pre.tar.bz2 The following bugs were fixed: * AM_INIT_AUTOMAKE is now correctly called after AC_CONFIG_AUX_DIR (Autoconf 1.8, Fedora Core 3). * The space reserved for the auto-generated socketname (java.socketname not set) was two elements too small (due to a typo). This caused problems with some malloc implementations. New Features: * Zend's "thread safety", "ZTS", supported: It is now possible to run the PHP/Java Bridge in a pure threaded Web-Server, for example httpd 2.x with the worker MPM. -- Threaded servers are usually faster than servers which fork() childs, but they are also more insecure (no process barrier). However, since the web-server threads communicate with the single java process through a secure proxy, the server part of PHP/Java Bridge is protected even if a hacker takes over the web-server. * Linux' abstract namespace (see unix(7)) supported. This means that no socket files are created on this operating system (-> increased performance and security). * Linux' struct ucred (see unix(7)) supported: The UID and GID are passed to the server-side. Since the credentials are provided by the kernel, it is impossible to fake the auth. information. * Improved logging: module, time, level, message. Version 1.0.8 will be released at the end of this month. ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2004-12-05 16:44:23
|
The version 1.0.7 of the PHP/Java Bridge is now available. The binary for RedHat Enterprise Linux, RedHat Fedora 1 and 2: -> http://prdownloads.sourceforge.net/php-java-bridge/php-java-bridge-1.0.7-1.i386.rpm?download For the rest (Windows, Solaris, BSD): -> http://prdownloads.sourceforge.net/php-java-bridge/php-java-bridge_1.0.7.tar.bz2?download The following bugs were fixed: * The bridge now generates a proper "class not found" exception instead of a null pointer exception when the user path is null. The following features were added: * PHP 5 support ------- Changes since the 1.0.7 preview: * Memory leaks fixed. * Sending arrays to java now works correctly. * A patch has been added to work around a bug in PHP 5.0.x (#29996) * The server doesn't catch SIGPWR anymore; this signal is used internally by Hans Boehm's garbage collector. ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2004-12-04 15:46:55
|
[copy of a private mail regarding crash in the shutdown procedure. This will affect the php-java-bridge on PHP 5, too] > #10 0x40300172 in zend_call_method > function_name=0x403a6397 "__destruct", That seems to be a bug in the shutdown order. PHP 5 first unmaps all modules an then shuts down the evaluator. The evaluator then tries to call the object destructors for the references it still keeps. In this case these are references to objects for classes of modules which do not exist anymore (unmapped by dlclose() probably). I am surprised that this works at all. Almost any external module which is loaded via dl() should have this problem. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2004-11-27 14:50:58
|
A preview of version 1.0.7 is available: The binary for RedHat: http://php-java-bridge.sf.net/php-java-bridge_pre-1.0.7-1.i386.rpm Source for the rest: http://php-java-bridge.sf.net/php-java-bridge_pre_1.0.7.tar.bz2 The following bugs were fixed: * The bridge now generates a proper "class not found" exception instead of a null pointer exception when the user path is null. The following features were added: PHP 5 support: * try/catch * __toString * object casting * instead of copying entire hashtables or arrays, which was necessary in PHP 4, the code now uses the PHP 5 iterator/array interface. Your code will work as before except that you won't get out of memory conditions when the array's or hashtables are large. It is now possible to iterate over everything that implements Collection or Map, not only hash or arrays. Your code will run much faster, too. * java_instanceof * java_class: Reference a java class without creating an instance. * java_exception * When the server part receives a SIGTERM or SIGPWR it will terminate gracefully, i.e. it will not accept new requests and will terminate when the current transactions complete. However, when the second SIGPWR arrives, it will terminate immediately, aborting all running transactions. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2004-11-18 18:27:13
|
> I am getting out of memory errors for java. You can increase the memory that the JVM uses (32 MB is standard) with the -Xmx switch. You must start the JVM as a separate process, though, because the bridge currently does not pass additional options to the VM. Please type php -i | fgrep java and paste the java command you see there to the command line and edit it so that it includes the -Xmx256M switch. For example: java -Xmx256M -Djava.classpath... \ -Djava.library.path=... \ -Djava.awt.headless=true \ JavaBridge \ /tmp/.my_java_bridge_socket 3 "" Please look up the correct -D values from the output of the php -i command. And then edit /etc/php.d/java.ini and set the java.socketname to your socket: /tmp/.my_java_bridge_socket Another option would be to edit the "/usr/bin/php-java-bridge" shell script which is used to start the bridge as a system service. But you must be root to do this. > I couldn't get it started again Which error message do you get? Probably the system /usr/share/java/.php-java-bridge_socket is in use? Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Robert H. <rob...@gm...> - 2004-11-18 14:13:24
|
I am getting out of memory errors for java. I am using the java vm lauched by apache method (I originally used the seperate vm method, but after I stopped it I couldn't get it started again, and this is a live server that I cannot reboot). Can anyone tell me how to modify the command line that java is started up with so that I can give it a higher upper limit for memory? God Bless, Robert Hostetter |
From: Jost B. <jos...@ya...> - 2004-11-17 11:37:30
|
My fault, sorry. The jxl documentation states that the createWorkbook() method is in jxl.Workbook, not in jxl.write.Workbook or jxl.write.WritableWorkbook which I have inferred from its name. Attached is a testjxl.php which will work. Regarding the null pointer exception, please read that as a "class not found exception". It's actually a bug in the bridge 1.0.6a private classloader which is trying to access a null java_library_path. I will change that null pointer to a proper "class not found exception" in the upcoming version 1.0.7. Thank you for reporting this problem. Here's the relevant log from /var/log/php-java-bridge.log: try to load class jxl.write.WritableWorkbook from jar:file:/usr/share/java/jdom.jar!/ java.lang.NullPointerException at JavaBridge$1.findClass(JavaBridge.java:123) at java.lang.ClassLoader.loadClass(ClassLoader.java:562) at java.lang.ClassLoader.loadClass(ClassLoader.java:494) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:256) at JavaBridge.CreateObject(JavaBridge.java:356) at JavaBridge.handleRequests(Native Method) at JavaBridge.run(JavaBridge.java:158) at java.lang.Thread.run(Thread.java:568) BTW: The new PHP 5 engine allows introspection, so when the bridge supports PHP 5, it will be possible to look inside a class and to interactively pick a certain method or property of a class. Jost |
From: Jost B. <jos...@ya...> - 2004-11-16 20:21:16
|
Hi, I get a "class not found" in 1.0.6 when I try to access the write.Workbook. Since we want to write a workbook we need write.WriteableWorkbook. I don't know why you get a null pointer instead of a "class not found" exception. Which version of the bridge and which version of jxl.jar do you use? I have tested with 1.0.6a and the jxl and code below: <?php java_set_library_path("http://www.jspwiki.org/attach?page=ExcelToHTMLPlugin%2Fjxl.jar"); $fname1 = tempnam("/tmp", "demo.xls"); $file = new java("java.io.File", $fname1); $wbClass=new java("jxl.write.WritableWorkbook"); $workbook=$wbClass->createWorkbook($file); ?> That worked as well as reading a workbook: $file = new java("java.io.File", "test.xls"); $wbClass=new java("jxl.Workbook"); $wbClass->getWorkbook($file); ... $row=$sheet->getRow(1); $stringClass = new java("java.lang.String"); foreach ($row as $key => $value) { print $key . " -> "; print $stringClass->ValueOf($value) . "\n"; } Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2004-11-16 18:43:40
|
On Tue, 2004-11-16 at 17:59, Robert Hostetter wrote: > $workbook = $workbookStatic.createWorkbook($file); Shouldn't this be $workbookStatic->createWorkbook($file); The . has a different meaning in PHP, the above code will cause PHP to look for createWorkbook in the global scope and then append the result to the object $workbookStatic. Does this help? Jost |
From: Robert H. <rob...@gm...> - 2004-11-16 16:59:32
|
I'm trying to use the jexcelapi http://www.andykhan.com/jexcelapi/ . The java code to create a work books looks like this import java.io.File; import java.util.Date; import jxl.*; Workbook workbook = Workbook.getWorkbook(new File("myfile.xls")); Here is my PHP version $fname1 = tempnam("/tmp", "demo.xls"); $file = new java("java.io.File", $fname1); echo java_last_exception_get(); $workbookStatic = new java("jxl.write.Workbook"); echo java_last_exception_get(); $workbook = $workbookStatic.createWorkbook($file); and here is my output Warning: java.lang.NullPointerException in /var/www/html/ross/oww_testing/stats/carrier_report_old_ross_style.php on line 14 Object Fatal error: Call to undefined function: createworkbook() in /var/www/html/ross/oww_testing/stats/carrier_report_old_ross_style.php on line 16 FYI line 14 is $workbookStatic = new java("jxl.write.Workbook"); I can't figure out how to run the static function createworkbook. If anyone has any tips I'd really appreciate it. |
From: Jost B. <jos...@ya...> - 2004-11-02 23:04:15
|
There's an update 1.0.6a available. The release 1.0.6a replaces the PHP/Java Bridge 1.0.6. It fixes a bug that appeared when apachectl was used to restart the bridge. This bug only affected the source distribution 1.0.6, not the RPM package for RedHat Enterprise Linux. -> http://prdownloads.sourceforge.net/php-java-bridge/php-java-bridge_1.0.6a.tar.bz2?download ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2004-10-31 18:30:44
|
The version 1.0.6 of the PHP/Java Bridge is now available. The binary for RedHat Enterprise Linux, RedHat Fedora 1 and 2: -> http://prdownloads.sourceforge.net/php-java-bridge/php-java-bridge-1.0.6-1.i386.rpm?download For the rest (Windows, Solaris, BSD): -> http://prdownloads.sourceforge.net/php-java-bridge/php-java-bridge_1.0.6.tar.bz2?download The following bugs were fixed: * When the socketname option is off and the bridge forks a daemon, it will no longer create a zombie along with the daemon. * When the socketname option is off and the bridge has forked the JVM it will no longer wait forever when the JVM aborts: The bridge communicates with the JVM via a pipe, when the VM dies the pipe is automatically closed by the OS. * The guard process protects itself against sighup. This solves the "log rotation issue" New Features: * java_set_library_path: A PHP script can add additional libraries to its environment. * During bridge startup the following directories are scanned for additional libraries: /usr/share/java:$EXTENSION_DIR/lib * 64 Bit JVM"s are supported. * Solaris 9 with broken stdio buffering supported. * Win98 and above supported. * Suse Enterprise 64/32 supported * The server part can now be configured and installed independently (driven by autoconf). * "./configure --with-java=yes" now configures the sources for GNU Java (gcj 3.3.3). ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2004-10-24 14:58:53
|
-> http://php-java-bridge.sourceforge.net/php-java-bridge_1.0.6-pre.tar.bz2 The following bugs were fixed: * When the socketname option is off and the bridge forks a daemon, it will no longer create a zombie along with the daemon. * When the socketname option is off and the bridge has forked the JVM it will no longer wait forever when the JVM aborts: The bridge communicates with the JVM via a pipe, when the VM dies the pipe is automatically closed by the OS. New Features: * java_set_library_path: A PHP script can add additional libraries to its environment. * During bridge startup the following directories are scanned for additional libraries: /usr/share/java:$EXTENSION_DIR/lib * 64 Bit JVM's are supported. * Solaris 9 with broken stdio buffering supported. * Win98 and above supported. * Suse Enterprise 64/32 supported * The server part can now be configured and installed independently (driven by autoconf). ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Fabio R. <fab...@te...> - 2004-10-06 18:18:41
|
I've gave it a try a few hours ago.. but definately the thing wont compile with mingw32 due to the pthreads and unix socket.. I was going to change the bridge to use tcp socket and single thread (coz the project I am doing allow me so) ... but since I have no much time, I went for xmlrpc for now :) I really enjoy playing around with the bridge... and I will try work on that as soon as I find some time off from work. .. the thing I like it the most is that.. it allows me to gradually port my php applications to java.. On Wed, 2004-10-06 at 15:07, Jost Boekemeier wrote: > --- Fabio Roger <fab...@te...> schrieb: > > have you tried to compile the bridge on windows? > > I try to avoid this if I can :). -- But seriously, at > least the server part of the bridge should run fine on > windows (with mingw32). > > The difficult part is probably the client/PHP part; I > haven't seen any descriptions how to compile PHP on > windows, yet. > > Another thing that comes to my mind; since IIS does > not use processes but threads, one has to compile the > PHP part with the experimental ZTS. I can't say if > the bridge compiles with ZTS or not, probably not. > But fixing it should be easy. > > A separate issue is the GCJ quality on this OS; > especially the GC. If I remember correctly, the boehm > GC isn't (or wasn't) really supported in this > environment. But running the server part with Sun or > IBM java should be no problem. > > > Jost > > > > > > > ___________________________________________________________ > Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de > |
From: Jost B. <jos...@ya...> - 2004-10-06 18:08:38
|
--- Fabio Roger <fab...@te...> schrieb: > have you tried to compile the bridge on windows? I try to avoid this if I can :). -- But seriously, at least the server part of the bridge should run fine on windows (with mingw32). The difficult part is probably the client/PHP part; I haven't seen any descriptions how to compile PHP on windows, yet. Another thing that comes to my mind; since IIS does not use processes but threads, one has to compile the PHP part with the experimental ZTS. I can't say if the bridge compiles with ZTS or not, probably not. But fixing it should be easy. A separate issue is the GCJ quality on this OS; especially the GC. If I remember correctly, the boehm GC isn't (or wasn't) really supported in this environment. But running the server part with Sun or IBM java should be no problem. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Fabio R. <fab...@te...> - 2004-10-06 10:06:26
|
have you tried to compile the bridge on windows? with cygwin? what would keep the bridge from compiling with say mingw32? pthreads.. unix sockets.. something more? |
From: Jost B. <jos...@ya...> - 2004-10-05 22:05:55
|
Hi, I've just checked code into the cvs head which fixes the gcj "AttachCurrentThread" bug. * The thread creation has been pulled to java level instead of calling AttachCurrentThread. This has the additional benefit that it should now be possible to add a thread pool, if desired. * The bridge now uses "registerNatives" to inject the native code references into the JVM. That means for example that you can compile the server part into a static binary which does not need any libraries anymore: echo "main(int argc,char**argv) {java_bridge_main_gcj(argc,argv);}" >start.c gcj --static -g0 -O2 -fjni -oJavaBridge.srv start.c \ ../server/JavaBridge.java \ ../server/natcJavaBridge.c \ [insert additional paths to .java classes here...] \ -I$JAVA_HOME/include -I$JAVA_HOME/include/linux \ -I.. ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2004-09-30 14:35:04
|
> handle each batch of requests > from client side > right? why not use a thread pool for that? Apache already contains a thread/process pool. Depending on your apache configuration there will be no more than 2*n processes/threads running at a time; 1 process or thread from the apache pool connected with 1 corresponding thread spawned by the JVM. If we want to avoid to spawn a new thread each time we accept, creating an "open" thread pool would make sense, however. But I am not sure it's worth it. Creating a NPTL thread or calling clone() isn't as expensive as one might think. -- The main purpose of a thread pool is to limit the resource usage, which is something apache already does for us. > have you tried a "pure java" server? would the > performance be too bad? Yes, but: a) Java currently does not support local sockets, so you must create a TCP/IP socket. Doing this on the web-server is not be a good idea. So you will want to start the server part on a different machine and open your firewall to accept connections on that port from the web-server: b) Non-local TCP/IP connections must check the byte order etc. so you cannot simply swrite/sread JNI types anymore. Which means that you must define a "standard" protocol first. Let's assume we solve this problem using soap or another protocol, the next problem will be: c) With TCP/IP sockets you have to pay attention to round-trips (latency problem). For example you cannot send the client a "here's the result as an array object" and then rely on the client to ask the server for additional information ("now send me array entry #12"). You must send all information is a single call, otherwise you will need N round trips. Assuming that one trip consts 50ms filling a PHP hashtable with 5000 entries would take 500s. So we decided to use local sockets, nearly the same way as jserv/tomcat's ajp adapter does it. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2004-09-29 16:12:33
|
> do you plan to create a CNI version your > natcJavaBridge.c? Well, CNI is certainly a much nicer interface to access java objects from C or C++ than JNI. If I start to develop an application from scratch, I would certainly consider CNI as an interface to access java objects---well, today I would probably choose .NET/MONO instead of java, but that's a different story. But since the bridge uses JNI and the JNI binding is now more or less bug-free, I don't think we should rewrite the code to use CNI. About 60% of the code is JNI code and the rest is standard socket code. However, I will certainly accept a patch if you want to write a CNI binding. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: <php...@li...> - 2004-09-28 15:15:17
|
> now the pattern is a little different though.. the > php script runs fine > for like 15 times.. then the same exception comes up > in JavaBridge.svr > console.. and the php output is this: [error message] It will work fine if you make sure that only one thread at a time accesses the gcj library. > java.lang.StringIndexOutOfBoundsException > at java.lang.String.charAt(int) > (/usr/lib/libgcj.so.4.0.0) It could be a separate issue, but I've had your script running for about half an hour without any problems (I suspected problems with the Boehm GC, but there aren't any. > This starts a new server process for each > incoming request. > > ... what this mean exactly? ... apache is > multithreaded.. and thus I can > have two php scripts running in different threads > and being called at > the same time.. The normal operation is that for each thread or process that apache starts the bridge creates a new request. The server side acknowledges this request and then spawns a new thread. Because of this gcj bug we currently cannot have multiple threads jni threads: 32users -> httpd |-- (32*httpd)--32 conn--->JVM |-> 32 threads So we must start a new process for each request from the bridge: 32users -> httpd |-- (32*httpd)--32 conn--> 32* JVM The best way to do this is to remove the java entry from the php.ini and to load the bridge via dl(). Of course, this is not the normal operation, but it will work until the bug has been fixed. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: <php...@li...> - 2004-09-27 20:55:14
|
do you plan to create a CNI version your natcJavaBridge.c? do you think it is worth? .. right now I dont have much time to work on that right now, but I may help if you think that it would be worth to do.. or even do it myself entirely.. then would just need some help from you.. |
From: <php...@li...> - 2004-09-27 20:34:26
|
> Hi, > [please excuse the delay] > > I have just checked a fix into the head of the CVS. > Please use this until the next version 1.0.6 is available. > > I have tested your program against the CVS head: > gcj: 3.2.3 > php: 4.3.4 > > gcj -fjni -oJavaBridge.srv \ > --main=JavaBridge \ > php-java-bridge-1.0.5/modules/JavaBridge.class \ > test/gcjtest.java \ > -L`pwd`/php-java-bridge-1.0.5/modules -lnatcJavaBridge > > su -c "killall -9 java; rm /tmp/.php-java-bridge" > > export LD_LIBRARY_PATH=`pwd`/php-java-bridge-1.0.5/modules > > ./JavaBridge.srv /tmp/.php-java-bridge 1 "" & > php test/gcjtest.php > > ==> 48890 yes.. the my original code used a lots of space chars as padding.. but sourceforge's forum engine shrank it to just one space.. thats why the output length is different... the original class was: public class Test { public String test () { StringBuffer sb = new StringBuffer (); for (int i=0;i<10000;i++) { sb.append (i); sb.append (" "); } return sb.toString (); } } so Test.test() outputs 248890 bytes. I just checkout the cvs and tried and the same problem comes up again. now the pattern is a little different though.. the php script runs fine for like 15 times.. then the same exception comes up in JavaBridge.svr console.. and the php output is this: Warning: java.lang.StringIndexOutOfBoundsException in /home/www/test.php on line 31 then I can just run the script again and it will work.. for 2 or 3 times.. then the exception and the warning come up again.. and this pattern is repeated as many time I try the thing. I compiled with -g so the exception is a bit more verbose: java.lang.StringIndexOutOfBoundsException at java.lang.String.charAt(int) (/usr/lib/libgcj.so.4.0.0) at gnu.gcj.convert.Output_8859_1.write(java.lang.String, int, int, char[]) (/usr/lib/libgcj.so.4.0.0) at java.lang.String.getBytes(java.lang.String) (/usr/lib/libgcj.so.4.0.0) at java.lang.String.getBytes() (/usr/lib/libgcj.so.4.0.0) at JavaBridge.setResult(long, long, java.lang.Object) (/home/Downloads/php-java-bridge/cvs/php-java-bridge/server/JavaBridge.java:114) at JavaBridge.Invoke(java.lang.Object, java.lang.String, java.lang.Object[], long, long) (/home/Downloads/php-java-bridge/cvs/php-java-bridge/server/JavaBridge.java:409) at _Jv_CallAnyMethodA(java.lang.Object, java.lang.Class, _Jv_Method, boolean, java.lang.Class[], jvalue, jvalue) (/usr/lib/libgcj.so.4.0.0) at __clone (/lib/tls/libc-2.3.3.so) > Additional notes regarding gcj: > > 1. GCJ cannot currently handle multiple threads accessing the library > via JNI (CNI might work, not tested). So until this gcj bug is fixed, > please start the bridge via dl() and do *not* hard-code the socketname > option. This starts a new server process for each incoming request. ... what this mean exactly? ... apache is multithreaded.. and thus I can have two php scripts running in different threads and being called at the same time.. so they cannot access the same class.method? or cannot use the php-java-bridge lib at once at all? |
From: <php...@li...> - 2004-09-27 16:22:45
|
test ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |