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: <php...@li...> - 2011-02-23 21:26:27
|
Hello, I'm new at php-java-bridge (and in java). I made a class in Java CXF to invoke a webservice with ws-security (something that is difficult in PHP). The class is the following in short: package be.icthealth.ehealth; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Logger; import org.apache.log4j.Level; import org.apache.ws.security.handler.WSHandlerConstants; import org.apache.cxf.endpoint.dynamic.DynamicClientFactory; import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor; import org.apache.cxf.endpoint.Client; import java.util.HashMap; import java.util.Map; import java.io.File; import java.net.URL; //import java.lang.reflect.Method; /** * * @author Koen Thomeer, MD, http://koen.thomeer.be */ public class Codage { /** * @param request the class EncodeRequest * @return response the class Response * @throws Exception */ public Object[] encode(Object request) throws Exception { //throw new Exception("test"); // configure logging BasicConfigurator.configure(); Logger.getLogger("org").setLevel(Level.WARN); java.util.logging.Logger.getLogger("").setLevel(java.util.logging.Level.WARNING); //code that I did leave out// // call the Codage Object[] response = client.invoke("encode", request); return response; } } The PHP code to call is the following (in short, it is nested in a function; $input is a PHP Instance): define("JAVA_PREFER_VALUES", false); require_once("http://localhost:8080/JavaBridgeWS/java/Java.inc"); try { $Codage = java("be.icthealth.ehealth.Codage"); $java_input = java_closure($input); $java_output = $Codage->encode($java_input); $output = java_values($java_output); print_r($output); } catch (JavaException $e) { // in case of an error, process the fault echo $e; } The error in the HTTPD log is the following: [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP Fatal error: Couldn't execute method java_InternalException::__set in Unknown on line 0 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP Stack trace: [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 1. {main}() /project/wmailer-test/www/secure/test/codage_test.php:0 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 2. EH_encode() /project/wmailer-test/www/secure/test/codage_test.php:5 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 3. JavaClass->encode() /project/wmailer-test/www/secure/test/codage5.php:219 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 4. Java->__call() http://localhost:8080/JavaBridgeWS/java/Java.inc:0 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 5. java_AbstractJava->__call() http://localhost:8080/JavaBridgeWS/java/Java.inc:1999 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 6. java_JavaProxy->__call() http://localhost:8080/JavaBridgeWS/java/Java.inc:1851 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 7. java_Client->invokeMethod() http://localhost:8080/JavaBridgeWS/java/Java.inc:1752 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 8. java_Client->getResult() http://localhost:8080/JavaBridgeWS/java/Java.inc:560 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 9. java_Client->getWrappedResult() http://localhost:8080/JavaBridgeWS/java/Java.inc:366 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 10. java_Arg->getResult() http://localhost:8080/JavaBridgeWS/java/Java.inc:360 [Wed Feb 23 22:17:37 2011] [error] [client 84.196.244.172] PHP 11. java_ThrowExceptionProxyFactory->checkResult() http://localhost:8080/JavaBridgeWS/java/Java.inc:235 Questions: 1. What I'm doing wrong? I don't understand the log. 2. Where I've to put the keystore, properties file, etc? Thx, Koen -- *Koen Thomeer*, MD, MSc http://koen.thomeer.be |
From: <php...@li...> - 2011-02-15 19:26:21
|
Hi John, it doesn't matter if you require Java.inc indirectly via Apache/Tomcat or directly from the ../JavaBridge/java/ directory. The result is all the same. Regards, Jost Bökemeier |
From: <php...@li...> - 2011-02-15 15:32:47
|
On Tue, Jan 25, 2011 at 1:58 AM, < php...@li...> wrote: > Hi, > > the cache-control HTTP header can be used to allow caching for a certain > time. > > Not sure why you think that require'ing a local php file may cause > problems. > Jost, My concern was that Java.inc wasn't just a static file, but rather had code generated dynamically via JSP or something like that. I don't know all the details of the Bridge's inner workings. I looked through the file and didn't see anything like that, so seemed pretty safe to me. > Regards, > Jost Bökemeier > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > -- John McGowan Lynch2 792 West Bartlett Road Bartlett, Illinois 60103 www.lynch2.com w:847-608-6900 Ext 4110 |
From: <php...@li...> - 2011-01-28 16:47:32
|
Hi again Jost, That seems to be the clue I was needing. Since we can have a very high number of classes, I thought about adding methods to a php factory class so we can call methods and read properties of any php class without having to create an interface for each one (we'll still create interfaces for the most important classes only). Here's our class: class PHPClassFactory { private static $_instance; public static function getInstance() { if (! self::$_instance) self::$_instance = new self(); return self::$_instance; } public static function getClosure() { return java_closure( PHPClassFactory::getInstance(), null, java('Testing$PhpFactory')); } public function makeObject($tObj, $arObj) { $name = java_values($tObj); $ar = java_values($arObj); $obj = new $name($ar); return java_closure($obj); } public function call($j_instance, $j_method, $j_params) { $instance = java_unwrap( $j_instance ); $method = java_values( $j_method ); $params = array(); foreach ($j_params as $j_param) { $params[] = java_values($j_param); } $return = call_user_func_array(array($instance, $method), $params); $j_instance = java_closure($instance); if (is_object($valor)) { return java_closure($return); } else { return $return; } } public function set($j_instance, $j_property, $j_val) { $instance = java_unwrap( $j_instance ); $property = java_values( $j_property ); $instance->$property = java_values( $j_val ); $j_instance = java_closure($instance); } public function get($j_instance, $j_property) { $instance = java_unwrap( $j_instance ); $property = java_values( $j_property ); $valor = $instance->$property; if (is_object($valor)) { return java_closure($valor); } else { return $valor; } } } So, in java we can use code like this: public static interface PhpFactory { Object makeObject(String clase, Object[] params); Object call(Object inst, String method, Object[] params); Object set(Object inst, String method, Object value); Object get(Object inst, String property); } // ... Object record = factory.makeObject("rhcmsTestTable", new Object[] {}); factory.set(record, "name", "Alfalfa"); factory.call(record, "save", new Object[] {}); // Would be equivalent to: // $record = new rhcmsTestTable(); // $record->name = "Alfalfa"; // $record->save(); So far, all the test we have done (not a lot yet, tho) this code works as expected. What do you think about this approach? El 27/01/2011 21:18, php...@li... escribió: > Hi, > > your > > new $class() > > is wrong. $class is a JavaObject and new $JavaObject() requires at least > one argument. > > Furthermore I'd use interfaces rather than the invocation handler: > public class Test { > public static interface PhpObjectFactory { > PhpObject makeObject(String t, Object[] args); > } > public static interface PhpObject { > void doSomething(Object[] args); > int getResult(); > } > > public static int runTests(PhpObjectFactory factory) throws Exception { > PhpObject[] objects = new PhpObject[100]; > for(int i=0; i<4; i++) { > objects[i] = factory.makeObject("ClassTest"+i, new Object[]{i}); > } > > for (int i=0; i<4; i++) { > objects[i].doSomething(new Object[]{i}); > } > > int res=0; > for (int i=0; i<4; i++) { > res+=objects[i].getResult(); > } > return res; > } > } > > <?php require_once("http://localhost:8080/JavaBridge/java/JavaBridge.inc"); > > class ClassTest0 { > var $i; > function ClassTest0 ($ar) { > $this->i = $ar[0]; > } > function doSomething($ar) { > $this->i += java_values($ar[0]); > } > function getResult() { > echo "result:{$this->i}\n"; > return $this->i; > } > } > class ClassTest1 extends ClassTest0{}; > class ClassTest2 extends ClassTest1{}; > class ClassTest3 extends ClassTest2{}; > > function makeObject($tObj, $arObj) { > $name = java_values($tObj); > $ar = java_values($arObj); > $obj = new $name($ar); > return java_closure($obj, null, java('Test$PhpObject')); > } > > echo java("Test")->runTests(java_closure(null, null, > java('Test$PhpObjectFactory'))); > ?> > > javac Test.java > jar cf Test.jar *.class > java -Djava.ext.dirs=. -jar JavaBridge.jar > > php -n -dallow_url_include=On test.php > > => 12 > > > Regards, > Jost Bökemeier > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users -- *Jaume López * Área de Innovación jau...@la... <mailto:jau...@la...> http://www.lavinia.tc/logos/lavinia_logo.gif www.laviniainteractiva.com <http://www.laviniainteractiva.com/> www.vertice360.com <http://www.vertice360.com/> T(34) 93 972 34 10 - ext 226 http://www.lavinia.tc/logos/vertice.jpg |
From: <php...@li...> - 2011-01-27 20:18:43
|
Hi, your new $class() is wrong. $class is a JavaObject and new $JavaObject() requires at least one argument. Furthermore I'd use interfaces rather than the invocation handler: public class Test { public static interface PhpObjectFactory { PhpObject makeObject(String t, Object[] args); } public static interface PhpObject { void doSomething(Object[] args); int getResult(); } public static int runTests(PhpObjectFactory factory) throws Exception { PhpObject[] objects = new PhpObject[100]; for(int i=0; i<4; i++) { objects[i] = factory.makeObject("ClassTest"+i, new Object[]{i}); } for (int i=0; i<4; i++) { objects[i].doSomething(new Object[]{i}); } int res=0; for (int i=0; i<4; i++) { res+=objects[i].getResult(); } return res; } } <?php require_once("http://localhost:8080/JavaBridge/java/JavaBridge.inc"); class ClassTest0 { var $i; function ClassTest0 ($ar) { $this->i = $ar[0]; } function doSomething($ar) { $this->i += java_values($ar[0]); } function getResult() { echo "result:{$this->i}\n"; return $this->i; } } class ClassTest1 extends ClassTest0{}; class ClassTest2 extends ClassTest1{}; class ClassTest3 extends ClassTest2{}; function makeObject($tObj, $arObj) { $name = java_values($tObj); $ar = java_values($arObj); $obj = new $name($ar); return java_closure($obj, null, java('Test$PhpObject')); } echo java("Test")->runTests(java_closure(null, null, java('Test$PhpObjectFactory'))); ?> javac Test.java jar cf Test.jar *.class java -Djava.ext.dirs=. -jar JavaBridge.jar php -n -dallow_url_include=On test.php => 12 Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-27 17:40:51
|
Hi Jost, Thank you for the answer. I managed to pass closures of objects created in the main php file to java as parameters of functions. But since we have a large amount off objects in our project, the ideal thing would be that the java code should be able to instantiate classes defined in php by itself. To do so, I created the following classes. In php: class PHPClassFactory { private static $_instance; public static function getInstance() { if (! isset(self::$_instance)) self::$_instance = new self(); return self::$_instance; } public static function getClosure() { return java_closure(self::getInstance()); } public static function instanciate($class, $params = null) { return java_closure( new $class() ); } } In java: public class PHPClassFactory { private static Proxy factory; private static PHPClassFactory instance; public static void setProxy(Proxy phpproxy) { factory = phpproxy; } public static PHPClassFactory getInstance() { if (instance == null) instance = new PHPClassFactory(); return instance; } public static Proxy instanciate(String clase) throws Throwable { return instanciate(clase, null); } public static Proxy instanciate(String clase, Object[] params) throws Throwable { PhpProcedure phpp = (PhpProcedure) Proxy.getInvocationHandler(factory); return (Proxy) phpp.invoke(factory, "instanciate", new Object[] { clase } ); } public static Object call(Proxy object, String method, Object[] params) throws Throwable { PhpProcedure phpp = (PhpProcedure) Proxy.getInvocationHandler(object); return (Proxy) phpp.invoke(object, method, params); } } So any java code (called from the main php) should be able to instantiate a php class and use its methods like this: PHPClassFactory.setProxy(factory); Proxy foo = PHPClassFactory.instanciate("FooPHPClass"); return (String) PHPClassFactory.call(foo, "greet", null); However, it doesn't work. Running that gives a warning and a fatal error (which probably is because the previous warning): Warning: Missing argument 1 for java_InternalJava::java_InternalJava() and Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:helloworld]]->useGreetTwo((o:Proxy)[o:$Proxy0]). Cause: java.lang.NoSuchMethodError: greet I'm out of ideas right now. Can you give me a clue, please? Thank you again, Jaume Lopez El 26/01/2011 22:25, php...@li... escribió: > Hi, > > interesting concept. But it doesn't work, because the jsr223 api doesn't > know about the existing php continuation and creates a new one. > > Jsr223 is for java->php->java... calls. For php->java->php... calls use > java_closure: > > function toString() { return "i am a php Object method called from java > called from php.";} > > echo java_closure(); > > Please see java_closure API doc for details. > > Regards, > Jost Bökemeier > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2011-01-26 22:37:12
|
Hi, interesting concept. But it doesn't work, because the jsr223 api doesn't know about the existing php continuation and creates a new one. Jsr223 is for java->php->java... calls. For php->java->php... calls use java_closure: function toString() { return "i am a php Object method called from java called from php.";} echo java_closure(); Please see java_closure API doc for details. Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-26 15:10:05
|
Greetings everyone, I take part in a fairly big project, several different companies take part on it. The main platform is made in PHP, but usual corporative madness means that some parts of the project will be made in Java (looks like some companies would go bankrupt if they produce some PHP code :p). So far, we've been able to call java from our main php framework with php/java bridge, which seems to be fairly easy with php/java bridge. But in order to avoid duplicating some work, the java code should be able to call objects that exist in the main PHP, which are not able to do yet. We try this in the php file: require_once("http://localhost:8080/JavaBridge/java/Java.inc"); class FooPHPClass { function greet() { return "I'm a FooPHPClass function"; } } java_context()->setAttribute('FooPHPClass', java_closure(new FooPHPClass()), 100); $hw = new java("helloworld"); java_call_with_continuation(); echo $hw->hello(); In the java side, we are trying this: public class helloworld { public String hello() { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine e = manager.getEngineByName("php-invocable"); String v = ""; try { Invocable i = (Invocable) e; // This needs to call the class defined in the original PHP thread Object FooPHPClass = e.getContext().getAttribute("FooPHPClass", 100); v = (String) i.invokeMethod(FooPHPClass, "greet", new Object[] { new String() }); e.eval((Reader) null); // release the continuation, flush output } catch (javax.script.ScriptException ex) { } catch (java.lang.NoSuchMethodException ex) { } return "Invoke result: " +v; } } With this, running the php file in apache, we get a Java exception with the message: "java.lang.IllegalStateException: PHP script did not pass its continuation to us!". I don't really know how to proceed to make it work, since I'm really new to the php/java bridge. |
From: <php...@li...> - 2011-01-25 21:05:29
|
Hi, maybe it doesn't have the permission. Or your shell isn't a bourne shell. You can try to uncomment set -x from the launcher.sh to see some debug info. If everything fails use apache to run php. |
From: <php...@li...> - 2011-01-25 14:45:23
|
Jost, java -cp JavaBridge.war TestInstallation works fine. the RESULT.html file looks good. So if this works and cna use the phpCGIservlet (and FAST CGI) capability why can't WebSphere start the phpCGIservlet indicating php can't be found ? Jon Rush Technical Consultant STG ISV Enablement: http://www.ibm.com/partnerworld/systems/isv Rochester, MN (507)253-5099 (tieline 553-5099) jr...@us... From: php...@li... To: php...@li... Date: 01/21/2011 12:22 PM Subject: Re: [Php-java-bridge-users] phpCGIservlet can't start php-cgi on IBM i Please use java -classpath JavaBridge.war TestInstallation, see install instructions for details. If it reports that php is missing, please install php. Regards, Jost Bökemeier ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2011-01-25 07:57:33
|
Hi, the cache-control HTTP header can be used to allow caching for a certain time. Not sure why you think that require'ing a local php file may cause problems. Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-24 22:20:52
|
Well, for whatever reason, PHP/APC just hits the tomcat server over and over for that file. Perhaps APC is caching it, but ends up having to talk to tomcat every time to make sure it's not different. As a test, I'm just hardcoding the path to the Java.inc file on the server and I'm noticing any problems. Right now the platform I'm installing my app on is pretty standard, so I don't have a problem doing it this way. I just was hoping to get some confirmation that requiring the Java.inc off of the filesystem as opposed to via httpd would be OK. /John On Sat, Jan 22, 2011 at 6:11 AM, < php...@li...> wrote: > Tomcat sends a timestamp, the last change time along with the response. So > APC should be able to cache the content. > > > > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > -- John McGowan Lynch2 792 West Bartlett Road Bartlett, Illinois 60103 www.lynch2.com w:847-608-6900 Ext 4110 |
From: <php...@li...> - 2011-01-23 08:13:15
|
Hi, we can't do anything to work around this PHP problem. Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-22 12:11:17
|
Tomcat sends a timestamp, the last change time along with the response. So APC should be able to cache the content. |
From: <php...@li...> - 2011-01-22 12:08:15
|
Hi! If each java.lang.Exception is wrapped by JavaException there's no way to access getMessage() as it it is hidden by the useless Exception::getMessage() PHP method. $exception->message; works, as JavaBridge.java implements bean properties. But it isn't cached. What about adding a getObject() method to JavaException? Peter |
From: <php...@li...> - 2011-01-21 21:05:04
|
I've been using the PHP/Java bridge for a while now, and it's working quit nicely. I'd like to optimize the performance of my app as much as possible. Part of what I'm doing is running APC. Something that I'm noticing is that the require_once('http://.../Java.inc'); call doesn't seem to be benefiting from APC caching functionality. Ever hit to my application pushes at hit to the tomcat server for Java.inc I was thinking of just changing the require_once to use the path "/var/lib/tomcat5/webapps/JavaBridge/java" to the Java.inc instead. It seems like this shouldn't be a problem, because I don't think Java.inc has anything dynamic about it, right? Does anybody know if it's possible to get APC to cache files accessed via http in addition to the stuff reference on the local filesystem? -- John McGowan Lynch2 792 West Bartlett Road Bartlett, Illinois 60103 www.lynch2.com w:847-608-6900 Ext 4110 |
From: <php...@li...> - 2011-01-21 18:21:41
|
Please use java -classpath JavaBridge.war TestInstallation, see install instructions for details. If it reports that php is missing, please install php. Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-21 18:17:17
|
Because PHP Exception has a method getMessage() which returns the contents of an internal PHP field. |
From: <php...@li...> - 2011-01-21 17:04:52
|
Jost, I tried putting the php-cgi executable from the IBM i Zend Server bin library into the .war file and redeployed. Same error: "Fatal Error: Failed to start PHP [/bin/sh, /QIBM/UserData/WebSphere/AppServer/V61/Base/profiles/WAS61SVR/installedApps/em15a_WAS61SVR/JavaBridgeIBMi252V4_war.ear/JavaBridgeIBMi252V4.war/WEB-INF/cgi/powerpc-os/php-cgi.sh" I put the php-cgi into the WEB-INF/cgi directory or should it go into the WEB-INF/cgi/powerpc-os directory ? I tried both, same result..... Jon Rush Technical Consultant STG ISV Enablement: http://www.ibm.com/partnerworld/systems/isv Rochester, MN (507)253-5099 (tieline 553-5099) jr...@us... From: php...@li... To: php...@li... Date: 01/20/2011 12:37 PM Subject: Re: [Php-java-bridge-users] phpCGIservlet can't start php-cgi on IBM i Hi, I think you'll have to add it to your .war archive and re-deploy it. Regards, Jost Bökemeier Am 20.01.2011 17:43 schrieb <php...@li...>: ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2011-01-21 10:42:08
|
Hello, Thank you for the response. Regards to what you said, I still don't understand why I can't get the exception message. If I have the following in a java code : throw new MyException("my message"); And the following php code : try { //call to java code } catch (JavaException e) { e->getCause() => returns the complete exception e->getCause()->toString() => returns the exception package and name and the message e->getMessage() or e->getCause()->getMessage() => returns nothing } Please tell me if I'm not using it well Thank you for your response. Regards, Fanny Puaud |---------+-------------------------------------------> | | php...@li...ur| | | ceforge.net | | | | | | 18/01/2011 19:31 | | | Veuillez répondre à | | | php-java-bridge-users | | | | |---------+-------------------------------------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| | | | Pour : php...@li... | | cc : | | Objet : Re: [Php-java-bridge-users] JavaException->getMessage() returns always an empty string | >--------------------------------------------------------------------------------------------------------------------------------------------------| Hi, It can be considered a bug. But it will stay that way. new JavaException returns a non-null value if you have passed the message in the constructor. For Exceptions generated by Java, the php message is always null, as we cannot override the php getmessage method. The bridge uses exception chaining, so you can get the information from the parent, as usual. Regards, Jost Bökemeier ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2011-01-20 18:37:28
|
Hi, I think you'll have to add it to your .war archive and re-deploy it. Regards, Jost Bökemeier Am 20.01.2011 17:43 schrieb <php...@li...>: |
From: <php...@li...> - 2011-01-20 16:43:32
|
I am trying to deploy JavaBridge to both WebSphere Express and the Integrated Application Server on IBM i OS V6R1 so that I can run BIRT reports and charts from my Zend PHP scripts on the iBM i. When I start the JavaBridge application I get this in the stderr logs for both servers: Fatal Error: Failed to start PHP [php-cgi, -v], reason: java.io.IOException: php-cgi: not found Could not start FCGI server: java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [php-cgi, -v] Timeout waiting for PHP FastCGI daemon php.java.bridge.http.FCGIConnectException: Could not connect to server at php.java.bridge.http.SocketChannelFactory.test(SocketChannelFactory.java:58) at php.java.bridge.http.FCGIConnectionPool.<init>(FCGIConnectionPool.java:175) at php.java.bridge.http.FCGIConnectionPool.<init>(FCGIConnectionPool.java:189) at php.java.servlet.ContextLoaderListener.createConnectionPool(ContextLoaderListener.java:541) at php.java.servlet.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:185) .... I created a symbolic link in the WEB-INF/cgi/powerpc-os directory called php-cgi-arch-os that links to the /usr/lcoal/zendsvr/bin/php-cgi executable that runs on IBM i and I can invoke in a shell.. The app server can't seem to find however.. Any one seen this on other platforms ? Jon Rush Technical Consultant STG ISV Enablement: http://www.ibm.com/partnerworld/systems/isv Rochester, MN (507)253-5099 (tieline 553-5099) jr...@us... |
From: <php...@li...> - 2011-01-19 19:23:46
|
Hi, so it is difficult for you to fetch the current object from the current java continuation? get_context()->getThis() might be a useful addition. But I don't think I will add it. You can easily write it yourself. Regards, Jost Bökemeier |
From: <php...@li...> - 2011-01-19 04:46:44
|
Hello! "this" helps you to access related features, in both languages. It is useless without inheritance, so your example does't make any sense. Use delegation and read the FAQ entry. Peter |
From: <php...@li...> - 2011-01-18 23:18:43
|
Hi there, Thanks for the reply. Unfortunately, my first question was not very clear - passing $this to the java method, as per my example, will not pass a reference to the current java object as the same "this" keyword does in java itself. Hence, my question was about what to use instead of "this" in my php code when trying to reference the current java object in a call to a java method, as per my example. I understand the usage of $this in pure php code but I think it acts differently to the java keyword of the same name doesn't it, unless I'm mistaken? I have gone carefully through the docs and examples and was still not having any success, hence the follow-up query. I'll keep looking. Thanks, Marc On 18 Jan 2011, at 18:23, php...@li... wrote: > Hi, > > in PHP "this" is written as $this. > > If you want to extend Java classes (rather than implementing interfaces) > please see our FAQ entry "How do I extend Java classes" for more > information. > > Regarding your other question; the interface is missing. Please carefully > read our "java_closure" API documentation. > > Regards, > Jost Bökemeier > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |