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...> - 2009-09-24 09:53:39
|
Hi, > This seems to work. Not really. If you want to catch unchecked exceptions, you need php/java bridge version 5.4.4.2 and set the JAVA_PREFER_VALUES option. We will add a parameter to java_begin_document()/java_end_document() in version 5.5 so that execution of the compiled document stops after the first exception. Regards, Jost Boekemeier On Sep 24, 2009 12:00 AM, <php...@li...> wrote: > Would it be feasible to create a generic callback interface in Java > and then use java_closure() ... Sorry to followup to my own post here, but I tried this out and it does work. The code I have on the Java side is roughly equivalent to the following: public static void runInTransaction(Callback callback) throws CallbackException { SessionFactory factory = getSessionFactory(); try { factory.getCurrentSession().beginTransaction(); callback.execute(); factory.getCurrentSession().getTransaction().commit(); } catch (RuntimeException e) { factory.getCurrentSession().getTransaction().rollback(); throw new CallbackException(e); } } >From the PHP side: class MyCallback { function execute() { //arbitrary code } } $callback = java_closure(new MyCallback(), null, new Java("Callback")); try { java(...)->runInTransaction($callback); } catch (JavaException $ex) { //handle exception } This seems to work. Does this sidestep the exception handling issue? Does it significantly impact performance versus ensuring that all methods in the arbitrary code declare all exceptions that they throw? Thanks in advance... Michael ------------------------------------------------------------------------------ Come build with us!... |
From: <php...@li...> - 2009-09-23 21:59:53
|
> Would it be feasible to create a generic callback interface in Java > and then use java_closure() on the PHP side to create the equivalent > of an anonymous inner class which implements the callback interface? > I could then pass this to a method on the Java side that executes the > callback within the context of a transaction, and additionally > handles and wraps all exceptions with a type that it explicitly > declares. Would this solve the issue without the performance > penalties that the JAVA_PREFER_VALUES option would? Or am I totally > on the wrong track here? Sorry to followup to my own post here, but I tried this out and it does work. The code I have on the Java side is roughly equivalent to the following: public static void runInTransaction(Callback callback) throws CallbackException { SessionFactory factory = getSessionFactory(); try { factory.getCurrentSession().beginTransaction(); callback.execute(); factory.getCurrentSession().getTransaction().commit(); } catch (RuntimeException e) { factory.getCurrentSession().getTransaction().rollback(); throw new CallbackException(e); } } >From the PHP side: class MyCallback { function execute() { //arbitrary code } } $callback = java_closure(new MyCallback(), null, new Java("Callback")); try { java(...)->runInTransaction($callback); } catch (JavaException $ex) { //handle exception } This seems to work. Does this sidestep the exception handling issue? Does it significantly impact performance versus ensuring that all methods in the arbitrary code declare all exceptions that they throw? Thanks in advance... Michael |
From: <php...@li...> - 2009-09-23 21:02:19
|
Jost Boekemeier wrote: > Please note that the option JAVA_PREFER_VALUES kills performance as it > checks for an exception after each call (I.e. each java call > generates a full network round-trip). Hi, Thanks for the response. I did see the JAVA_PREFER_VALUES option in the other thread I referenced and saw the warning about performance, so I want to avoid that option if at all possible. At this point my question is really more of a Java question and not so much of a bridge question, but do you have any general pointers as to a pattern I can use to handle these unchecked exceptions on the Java side without having to sprinkle declarations all thoughout my Java code? Would it be feasible to create a generic callback interface in Java and then use java_closure() on the PHP side to create the equivalent of an anonymous inner class which implements the callback interface? I could then pass this to a method on the Java side that executes the callback within the context of a transaction, and additionally handles and wraps all exceptions with a type that it explicitly declares. Would this solve the issue without the performance penalties that the JAVA_PREFER_VALUES option would? Or am I totally on the wrong track here? Thanks again. |
From: <php...@li...> - 2009-09-23 20:07:46
|
Hi, In PHP/Java Bridge version 5.4.4.2 you can use the option JAVA_PREFER_VALUES: Download version 5.4.4.2, for example: http://downloads.sourceforge.net/project/php-java-bridge/Binary%20package/php-java-bridge_5.4.4.2/JavaBridge.jar?use_mirror=dfn Type java -jar JavaBridge.jar --version -> 5.4.4.2 Type java -jar JavaBridge.jar SERVLET_LOCAL:8081 3 "" Type php -n -dallow_url_include=On test.php Test.php: <?php define ("JAVA_PREFER_VALUES", true); require_once("http://localhost:8081/JavaBridge/java/Java.inc"); java_require("foo.jar"); try { java("Foo")->call(false); java("Foo")->call(true); java("Foo")->call(false); } catch (JavaException $e) { echo $e; } ?> Foo.java: public class Foo { public static void call(boolean b) { if (b) throw new RuntimeException("bleh!"); } } Please note that the option JAVA_PREFER_VALUES kills performance as it checks for an exception after each call (I.e. each java call generates a full network round-trip). I have tested this against PHP/Java Bridge version 5.4.4.2. In 5.5.2 this option doesn't work anymore (we'll re-enable it in a later 5.5 release). However, I think it is better to handle unchecked exceptions in your own Java class. Regards, Jost Boekemeier On Sep 23, 2009 8:30 PM, <php...@li...> wrote: Hi, I'm in the process of evaluating the PHP/Java Bridge. My company wants to use it to leverage an existing set of data model classes we have created using Hibernate. I've successfully set up a test that is working fine, but I've come across something I'm concerned and a bit confused about and was hoping the list could help me. I've read the FAQ entry which states that all exceptions crossing the boundary must be declared, as well as a thread in the mailing list archives here: http://sourceforge.net/mailarchive/message.php?msg_id=3921.39923.qm%40web505 08.mail.re2.yahoo.com My concern is that this will prevent us from using the bridge in the way we have envisioned, so I'm asking for advice on how to handle it. We want to be able to perform arbitrary operations on our data model classes within the scope of a Hibernate transaction, using a pattern like the following: $factory = getSessionFactory(); //Hibernate session factory try { $factory->getCurrentSession()->beginTransaction(); //arbitrary code here $factory->getCurrentSession()->getTransaction()->commit(); } catch (JavaException $ex) { $factory->getCurrentSession()->getTransaction()->rollback(); throw $ex; } My concern is that there are several places within the arbitrary code sections where we are calling methods that throw unchecked exceptions that subclass RuntimeException. Most of our exceptions will occur during the commit, but not all of them. Is our approach even feasible with the bridge? We do not want to have to declare "throws RuntimeException" on hundreds of methods in our data model classes. Is there some other approach we could take, perhaps passing our arbitrary code as a closure to the java side and having a top level handler for all exceptions on the java side of things? I apologize if I am misunderstanding anything. I have been programming Java for a couple of years but so far I've only used basic servlets, no JEE containers or anything more complicated so I'm basically looking for guidance. Thanks in advance! Michael Sims ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-23 19:18:19
|
dominik wrote: > I would recommend to encapsulate your arbitrary code inside a java > method and simply call > the method from the php-side of the bridge, instead of rebuilding it > in php. Thanks for the suggestion. That doesn't really work for what we are wanting to do, however. We will have this arbitrary code spread all through our PHP application, in the PHP code that handles user requests. Much of the arbitrary code in question will interact with parameters supplied from the user, and the data model classes will be used in the view to render the page. While we could create dozens of methods for each different PHP page that accepts various parameters, this would be a maintenance nightmare and would defeat the purpose of trying to leverage this code in the first place. Thanks again. Michael |
From: <php...@li...> - 2009-09-23 18:36:34
|
I would recommend to encapsulate your arbitrary code inside a java method and simply call the method from the php-side of the bridge, instead of rebuilding it in php. ~ dominik On Wed, Sep 23, 2009 at 8:10 PM, <php...@li...> wrote: > Hi, > > I'm in the process of evaluating the PHP/Java Bridge. My company wants to > use it to leverage an existing set of data model classes we have created > using Hibernate. I've successfully set up a test that is working fine, but > I've come across something I'm concerned and a bit confused about and was > hoping the list could help me. > > I've read the FAQ entry which states that all exceptions crossing the > boundary must be declared, as well as a thread in the mailing list archives > here: > http://sourceforge.net/mailarchive/message.php?msg_id=3921.39923.qm%40web505 > 08.mail.re2.yahoo.com > > My concern is that this will prevent us from using the bridge in the way we > have envisioned, so I'm asking for advice on how to handle it. > > We want to be able to perform arbitrary operations on our data model classes > within the scope of a Hibernate transaction, using a pattern like the > following: > > $factory = getSessionFactory(); //Hibernate session factory > try { > > $factory->getCurrentSession()->beginTransaction(); > > //arbitrary code here > > $factory->getCurrentSession()->getTransaction()->commit(); > > } catch (JavaException $ex) { > $factory->getCurrentSession()->getTransaction()->rollback(); > throw $ex; > } > > My concern is that there are several places within the arbitrary code > sections where we are calling methods that throw unchecked exceptions that > subclass RuntimeException. Most of our exceptions will occur during the > commit, but not all of them. > > Is our approach even feasible with the bridge? We do not want to have to > declare "throws RuntimeException" on hundreds of methods in our data model > classes. Is there some other approach we could take, perhaps passing our > arbitrary code as a closure to the java side and having a top level handler > for all exceptions on the java side of things? > > I apologize if I am misunderstanding anything. I have been programming Java > for a couple of years but so far I've only used basic servlets, no JEE > containers or anything more complicated so I'm basically looking for > guidance. > > Thanks in advance! > > Michael Sims > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2009-09-23 18:29:52
|
Hi, I'm in the process of evaluating the PHP/Java Bridge. My company wants to use it to leverage an existing set of data model classes we have created using Hibernate. I've successfully set up a test that is working fine, but I've come across something I'm concerned and a bit confused about and was hoping the list could help me. I've read the FAQ entry which states that all exceptions crossing the boundary must be declared, as well as a thread in the mailing list archives here: http://sourceforge.net/mailarchive/message.php?msg_id=3921.39923.qm%40web505 08.mail.re2.yahoo.com My concern is that this will prevent us from using the bridge in the way we have envisioned, so I'm asking for advice on how to handle it. We want to be able to perform arbitrary operations on our data model classes within the scope of a Hibernate transaction, using a pattern like the following: $factory = getSessionFactory(); //Hibernate session factory try { $factory->getCurrentSession()->beginTransaction(); //arbitrary code here $factory->getCurrentSession()->getTransaction()->commit(); } catch (JavaException $ex) { $factory->getCurrentSession()->getTransaction()->rollback(); throw $ex; } My concern is that there are several places within the arbitrary code sections where we are calling methods that throw unchecked exceptions that subclass RuntimeException. Most of our exceptions will occur during the commit, but not all of them. Is our approach even feasible with the bridge? We do not want to have to declare "throws RuntimeException" on hundreds of methods in our data model classes. Is there some other approach we could take, perhaps passing our arbitrary code as a closure to the java side and having a top level handler for all exceptions on the java side of things? I apologize if I am misunderstanding anything. I have been programming Java for a couple of years but so far I've only used basic servlets, no JEE containers or anything more complicated so I'm basically looking for guidance. Thanks in advance! Michael Sims |
From: <php...@li...> - 2009-09-23 15:32:45
|
Hi, > Java.inc on line 534 (even whe ShutdownWithBrokenConnection is called after an protocol error. You have likely changed the JAVA_SERVLET option to off, but using a servlet backend. -- The error message means that the XML parser could not parse the HTML response from the servlet back end. Please correct or remove your php.ini/java.ini or run php with the -n option to ignore your broken ini file. On Sep 22, 2009 4:37 PM, <php...@li...> wrote: Hi, I have Centos 5.3 which has package of PHP 5.1.6. I downloaded the latest JavaBridge and I get the error Call to undefined function error_get_last() in Java.inc on line 534 (even when running test on command line). The documentation for JavaBridge says it is compatible with PHP version >= 5.1.2 but this function call is only supported by PHP version >= 5.2.0 Must I upgrade to PHP 5.2.0 or can I get an older JavaBridge version from somewhere as I don't want to upset the 'standard' Centos 5.3 environment? Regards, John J Smith Software Engineer Transport Technology Services Highways Division Mott MacDonald 1 Atlantic Quay Broomielaw Glasgow G2 8JB Direct: +44 (0)141 222 9121 Fax: +44 (0)141 221 8083 www.mottmac.com <http://www.mottmac.com/> www.transporttech.mottmac.com <file:///C:/Documents%20and%20Settings/smi41108/Application%20Data/Micro soft/Signatures/www.transporttech.mottmac.com> This message is from Mott MacDonald Limited Registered in England No. 1243967 Mott MacDonald House, 8-10 Sydenham Road, Croydon, Surrey, CR0 2EE, United Kingdom ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-22 15:51:45
|
Hi, Java.inc does work with php 5.1.2, as long as there's no fatal error. For much older php versions (e.g. php 4) please see our FAQ. > function error_get_last() in Java.inc on line Which error triggered this? Regards, Jost Boekemeier On Sep 22, 2009 4:37 PM, <php...@li...> wrote: Hi, I have Centos 5.3 which has package of PHP 5.1.6. I downloaded the latest JavaBridge and I get the error Call to undefined function error_get_last() in Java.inc on line 534 (even when running test on command line). The documentation for JavaBridge says it is compatible with PHP version >= 5.1.2 but this function call is only supported by PHP version >= 5.2.0 Must I upgrade to PHP 5.2.0 or can I get an older JavaBridge version from somewhere as I don't want to upset the 'standard' Centos 5.3 environment? Regards, John J Smith Software Engineer Transport Technology Services Highways Division Mott MacDonald 1 Atlantic Quay Broomielaw Glasgow G2 8JB Direct: +44 (0)141 222 9121 Fax: +44 (0)141 221 8083 www.mottmac.com <http://www.mottmac.com/> www.transporttech.mottmac.com <file:///C:/Documents%20and%20Settings/smi41108/Application%20Data/Micro soft/Signatures/www.transporttech.mottmac.com> This message is from Mott MacDonald Limited Registered in England No. 1243967 Mott MacDonald House, 8-10 Sydenham Road, Croydon, Surrey, CR0 2EE, United Kingdom ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-22 14:36:44
|
Hi, I have Centos 5.3 which has package of PHP 5.1.6. I downloaded the latest JavaBridge and I get the error Call to undefined function error_get_last() in Java.inc on line 534 (even when running test on command line). The documentation for JavaBridge says it is compatible with PHP version >= 5.1.2 but this function call is only supported by PHP version >= 5.2.0 Must I upgrade to PHP 5.2.0 or can I get an older JavaBridge version from somewhere as I don't want to upset the 'standard' Centos 5.3 environment? Regards, John J Smith Software Engineer Transport Technology Services Highways Division Mott MacDonald 1 Atlantic Quay Broomielaw Glasgow G2 8JB Direct: +44 (0)141 222 9121 Fax: +44 (0)141 221 8083 www.mottmac.com <http://www.mottmac.com/> www.transporttech.mottmac.com <file:///C:/Documents%20and%20Settings/smi41108/Application%20Data/Micro soft/Signatures/www.transporttech.mottmac.com> This message is from Mott MacDonald Limited Registered in England No. 1243967 Mott MacDonald House, 8-10 Sydenham Road, Croydon, Surrey, CR0 2EE, United Kingdom |
From: <php...@li...> - 2009-09-21 10:47:41
|
> "spl1 autoload Foo spl2 autoload Foo spl3 autoload > Foo" can you tell me why? Because the first call to spl_autoload_register incorrectly re-initializes the autoload machinery. The result should be "spl1 autoload Foo spl2 autoload Foo spl3 autoload Foo legacy autoload Foo". > 2. as I said I am a begginer. Can I use your "words" > when report the bugs to Joomla and to java-ph Yes, you can refer to this conversation. Regards, Jost Boekemeier On Sep 21, 2009 12:37 PM, <php...@li...> wrote: Thank you for your reply. I am not a very good programmer... and I am not an English native speaker, so please excuse me if I bother you: 1. when I run the script in my environment the result was: "spl1 autoload Foo spl2 autoload Foo spl3 autoload Foo" can you tell me why? 2. as I said I am a begginer. Can I use your "words" when I report the bugs to Joomla and to java-php bridges Thank you, Ciprian Muntean aka cipm From: php...@li... <php...@li...> Subject: Re: [Php-java-bridge-users] using php-java-bridge with joomla To: php...@li... Date: Monday, September 21, 2009, 1:12 PM Please report this bug to both, the "joomla" and the php maintainers. First, __autoload must not b... ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ php-java-bridge-users ma... ------------------------------------------------------------------------------ Come build with us! T... ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ php-java-bridge-users ma... |
From: <php...@li...> - 2009-09-21 10:37:17
|
Thank you for your reply. I am not a very good programmer... and I am not an English native speaker, so please excuse me if I bother you: 1. when I run the script in my environment the result was: "spl1 autoload Foo spl2 autoload Foo spl3 autoload Foo" can you tell me why? 2. as I said I am a begginer. Can I use your "words" when I report the bugs to Joomla and to java-php bridges Thank you, Ciprian Muntean aka cipm From: php...@li... <php...@li...> Subject: Re: [Php-java-bridge-users] using php-java-bridge with joomla To: php...@li... Date: Monday, September 21, 2009, 1:12 PM Please report this bug to both, the "joomla" and the php maintainers. First, __autoload must not be used by php libraries. It is reserved for applications to bind libraries together; It can be used at most once. Please report this bug to the "joomla" library authors. Second, spl_autoload can be used by libraries, but it must not destroy any existing __autoload handler: <?php function autoload_legacy($x) {echo "legacy autoload $x\n"; return false;} function autoload_spl1($x) {echo "spl1 autoload $x\n"; return false;} function autoload_spl2($x) {echo "spl2 autoload $x\n"; return false;} function autoload_spl3($x) {echo "spl3 autoload $x\n"; return false;} spl_autoload_register("autoload_spl1"); function __autoload($x) {return autoload_legacy($x);} spl_autoload_register("autoload_spl2"); spl_autoload_register("autoload_spl3"); @new Foo(); ?> Please report this bug to the php maintainers. Ask them to either deprecate __autoload or to change spl_autoload_register to not destroy any existing __autoload hook. The result of the above php script must be "spl1 spl2 spl3 legacy". In the meantime you can disable the use of spl_autoload by setting the define JAVA_DISABLE_AUTOLOAD. If you do this, you won't be able to autoload java classes anymore. Regards, Jost Boekemeier On Sep 21, 2009 10:14 AM, <php...@li...> wrote: Hi, I installed successfully Joomla on the Glassfish server based on the http://www2.sebastiendionne.ca:8282/glassfish/joomla-on-glassfish.html My problem came when I tried to insert require_once ("java/Java.inc"); to my code. All php classes that was find before, no are not recognize anymore. ex. javax.servlet.ServletException: java.lang.RuntimeException: PHP Fatal error: Class 'JModuleHelper' not found if I comment require_once ("java/Java.inc"); everything goes smoothly. Do you have any ideas if Java.inc could overwrite somehow all classes included before? Or other ideas about this problem? thx in advance, Cipm ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-21 10:13:08
|
Please report this bug to both, the "joomla" and the php maintainers. First, __autoload must not be used by php libraries. It is reserved for applications to bind libraries together; It can be used at most once. Please report this bug to the "joomla" library authors. Second, spl_autoload can be used by libraries, but it must not destroy any existing __autoload handler: <?php function autoload_legacy($x) {echo "legacy autoload $x\n"; return false;} function autoload_spl1($x) {echo "spl1 autoload $x\n"; return false;} function autoload_spl2($x) {echo "spl2 autoload $x\n"; return false;} function autoload_spl3($x) {echo "spl3 autoload $x\n"; return false;} spl_autoload_register("autoload_spl1"); function __autoload($x) {return autoload_legacy($x);} spl_autoload_register("autoload_spl2"); spl_autoload_register("autoload_spl3"); @new Foo(); ?> Please report this bug to the php maintainers. Ask them to either deprecate __autoload or to change spl_autoload_register to not destroy any existing __autoload hook. The result of the above php script must be "spl1 spl2 spl3 legacy". In the meantime you can disable the use of spl_autoload by setting the define JAVA_DISABLE_AUTOLOAD. If you do this, you won't be able to autoload java classes anymore. Regards, Jost Boekemeier On Sep 21, 2009 10:14 AM, <php...@li...> wrote: Hi, I installed successfully Joomla on the Glassfish server based on the http://www2.sebastiendionne.ca:8282/glassfish/joomla-on-glassfish.html My problem came when I tried to insert require_once ("java/Java.inc"); to my code. All php classes that was find before, no are not recognize anymore. ex. javax.servlet.ServletException: java.lang.RuntimeException: PHP Fatal error: Class 'JModuleHelper' not found if I comment require_once ("java/Java.inc"); everything goes smoothly. Do you have any ideas if Java.inc could overwrite somehow all classes included before? Or other ideas about this problem? thx in advance, Cipm ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-21 08:13:53
|
Hi, I installed successfully Joomla on the Glassfish server based on the http://www2.sebastiendionne.ca:8282/glassfish/joomla-on-glassfish.html My problem came when I tried to insert require_once ("java/Java.inc"); to my code. All php classes that was find before, no are not recognize anymore. ex. javax.servlet.ServletException: java.lang.RuntimeException: PHP Fatal error: Class 'JModuleHelper' not found if I comment require_once ("java/Java.inc"); everything goes smoothly. Do you have any ideas if Java.inc could overwrite somehow all classes included before? Or other ideas about this problem? thx in advance, Cipm |
From: <php...@li...> - 2009-09-17 13:22:42
|
JAVA_SERVLET false is a new feature in Java.inc 5.5.2. In earlier Java.inc versions you had to write a callback function "java_get_default_channel()", please see the NEWS file for details. On Sep 17, 2009 3:06 PM, <php...@li...> wrote: Ok cool, thanks I'll try the INET_LOCAL as well! I think last time I tried INET_LOCAL I didn't also do JAVA_SERVLET=false which probably is why it didn't work. I'd imagine it affects the way the client tries to communicate with the back-end. Alan On Sep 17, 2009, at 8:56 AM, php-java-bridge- us...@li... wrote: > [Please excuse the delay] > >> Easier to handle is relative, n... > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart > your > developing skills, take BlackBerry mobile applications to market and > stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users-----------------------------... Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-17 13:05:24
|
Ok cool, thanks I'll try the INET_LOCAL as well! I think last time I tried INET_LOCAL I didn't also do JAVA_SERVLET=false which probably is why it didn't work. I'd imagine it affects the way the client tries to communicate with the back-end. Alan On Sep 17, 2009, at 8:56 AM, php-java-bridge- us...@li... wrote: > [Please excuse the delay] > >> Easier to handle is relative, no? > > May be. On Windows and Linux all you need to do is to start the > graphical > software installer and install tomcat. After that it runs as a > standard > system service. > >> Is it *bad* to run it standalone? > > Not at all. But it may not be as fast as a servlet back end with > JAVA_PERSISTENT_SERVLET_CONNECTIONS set to true. > > The simple servlet engine built into JavaBridge.jar cannot handle > persistent > connections (it uses http/1.0, not http/1.1). But the standalone > socket > listener can use persistent connections: > > java -jar JavaBridge.jar INET_LOCAL:9267 > > And in your php script or in java.inc set JAVA_HOSTS to > "127.0.0.1:9267" and > JAVA_SERVLET to false. > > Regards, > Jost Boekemeier > > On Sep 14, 2009 12:26 AM, <php-java-bridge- > us...@li...> > wrote: > > Easier to handle is relative, no? I have -0- experience running Java > App Servers. This is why I run it standalone; it is plenty fast, has > been very reliable for me, and it's only 1 process to manage, so it's > simple for me to understand. If a java app server has problems, I have > no idea how to easily deal with it... > > Is it *bad* to run it standalone? What would I gain by switching? > > Alan > > On Sep 13, 2009, at 6:19 PM, php-java-bridge- > > us...@li... wrote: > There is one in the CVS attic. > > > > However, Tomcat or JEE serv... > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart > your > developing skills, take BlackBerry mobile applications to market and > stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-17 12:57:01
|
[Please excuse the delay] > Easier to handle is relative, no? May be. On Windows and Linux all you need to do is to start the graphical software installer and install tomcat. After that it runs as a standard system service. > Is it *bad* to run it standalone? Not at all. But it may not be as fast as a servlet back end with JAVA_PERSISTENT_SERVLET_CONNECTIONS set to true. The simple servlet engine built into JavaBridge.jar cannot handle persistent connections (it uses http/1.0, not http/1.1). But the standalone socket listener can use persistent connections: java -jar JavaBridge.jar INET_LOCAL:9267 And in your php script or in java.inc set JAVA_HOSTS to "127.0.0.1:9267" and JAVA_SERVLET to false. Regards, Jost Boekemeier On Sep 14, 2009 12:26 AM, <php...@li...> wrote: Easier to handle is relative, no? I have -0- experience running Java App Servers. This is why I run it standalone; it is plenty fast, has been very reliable for me, and it's only 1 process to manage, so it's simple for me to understand. If a java app server has problems, I have no idea how to easily deal with it... Is it *bad* to run it standalone? What would I gain by switching? Alan On Sep 13, 2009, at 6:19 PM, php-java-bridge- us...@li... wrote: > There is one in the CVS attic. > > However, Tomcat or JEE serv... |
From: <php...@li...> - 2009-09-13 22:25:58
|
Easier to handle is relative, no? I have -0- experience running Java App Servers. This is why I run it standalone; it is plenty fast, has been very reliable for me, and it's only 1 process to manage, so it's simple for me to understand. If a java app server has problems, I have no idea how to easily deal with it... Is it *bad* to run it standalone? What would I gain by switching? Alan On Sep 13, 2009, at 6:19 PM, php-java-bridge- us...@li... wrote: > There is one in the CVS attic. > > However, Tomcat or JEE servers are easier to handle, please use them > as the > Java back end, if you can. -- these don't have obscure options like > SERVLET > or SERVLET_LOCAL either. :) > > Regards, > Jost Boekemeier > > On Sep 14, 2009 12:13 AM, <php-java-bridge- > us...@li...> > wrote: > > Here is a little init script I wrote that I use to start/stop a php- > java-bridge standalone instance on my machine. > > It took quite a bit of messing around to get all the various pieces > working and robust (ie logging startup failure output to the log file; > properly detecting the PID of java, etc). > > I am not 100% confident that the line that launches the bridge is > perfect; so use your own knowledge to correct it. I am talking to Jost > in another thread about it at this time. > > JAVA=/path/to/java > JAVA_BRIDGE_PATH=/path/to/JavaBridge.jar > CONTAINER_DIR=/path/to/my/project > > > #!/bin/zsh > PIDFILE=$CONTAINER_DIR/runtime/jvm.pid > > start() { > echo "Starting JVM: " > LOGFILE=$CONTAINER_DIR/log/jvm.log > $JAVA -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 - > jar $JAVA_BRIDGE_PATH SERVLET:9676 2>$LOGFILE 1>$LOGFILE & > echo $! > $PIDFILE > echo "waiting 5s for JVM to finish starting up..." > sleep 5 > PID=`cat $PIDFILE` > ps -p $PID > /dev/null > if [ $? = 0 ]; then > echo "Java Bridge VM started in background, detached from > shell. PID=$PID" > exit 0 > else > echo "Java Bridge VM failed to start." > exit 1 > fi > } > stop() { > pid=`cat $PIDFILE` > echo "Stopping JVM (alleged pid $pid}): " > ps -p `cat $PIDFILE` | grep java > if [ $? = 0 ]; then > kill `cat $PIDFILE` > rm -f $PIDFILE > exit 0 > else > echo "PID is not a jvm. Aborting stop." > exit 1 > fi > } > > case "$1" in > start) > start > ;; > stop) > stop > ;; > *) > echo $"Usage: runbridge.sh {start|stop}" > exit 1 > esac > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-13 22:20:11
|
There is one in the CVS attic. However, Tomcat or JEE servers are easier to handle, please use them as the Java back end, if you can. -- these don't have obscure options like SERVLET or SERVLET_LOCAL either. :) Regards, Jost Boekemeier On Sep 14, 2009 12:13 AM, <php...@li...> wrote: Here is a little init script I wrote that I use to start/stop a php- java-bridge standalone instance on my machine. It took quite a bit of messing around to get all the various pieces working and robust (ie logging startup failure output to the log file; properly detecting the PID of java, etc). I am not 100% confident that the line that launches the bridge is perfect; so use your own knowledge to correct it. I am talking to Jost in another thread about it at this time. JAVA=/path/to/java JAVA_BRIDGE_PATH=/path/to/JavaBridge.jar CONTAINER_DIR=/path/to/my/project #!/bin/zsh PIDFILE=$CONTAINER_DIR/runtime/jvm.pid start() { echo "Starting JVM: " LOGFILE=$CONTAINER_DIR/log/jvm.log $JAVA -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 - jar $JAVA_BRIDGE_PATH SERVLET:9676 2>$LOGFILE 1>$LOGFILE & echo $! > $PIDFILE echo "waiting 5s for JVM to finish starting up..." sleep 5 PID=`cat $PIDFILE` ps -p $PID > /dev/null if [ $? = 0 ]; then echo "Java Bridge VM started in background, detached from shell. PID=$PID" exit 0 else echo "Java Bridge VM failed to start." exit 1 fi } stop() { pid=`cat $PIDFILE` echo "Stopping JVM (alleged pid $pid}): " ps -p `cat $PIDFILE` | grep java if [ $? = 0 ]; then kill `cat $PIDFILE` rm -f $PIDFILE exit 0 else echo "PID is not a jvm. Aborting stop." exit 1 fi } case "$1" in start) start ;; stop) stop ;; *) echo $"Usage: runbridge.sh {start|stop}" exit 1 esac ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-13 22:18:35
|
>> r SERVLET:9676 > > SERVLET does set promiscuous mode. For local communication please use > SERVLET_LOCAL. Awesome! Just did that and bye-bye temp files. Thanks so much for the quick response. > However, Java.inc should delete the fifo if the back end doesn't > want to use > it, of course. Of course! Glad I could help to find the bug. Thanks again! Alan > > On Sep 14, 2009 12:00 AM, <php-java-bridge- > us...@li...> > wrote: > > Hi Jost- > > Glad to report the bug! Sadly I seem to be good at finding them ;) > > This is the *only* setup I use for getting the bridge going. If this > either of these settings turns on promiscuous mode, I didn't do it on > purpose. > > // PHP side (duh) > define ("JAVA_HOSTS", "127.0.0.1:9676"); > define ("JAVA_PREFER_VALUES", true); # required for BC with the way > we wrote our php-java-bridge code. Could try to debug and fix but no > downside to this. > require_once('/Users/alanpinstein/dev/sandbox/showcase2/showcase2/ > classes/dieselpoint/Java.inc'); > > // bridge side > java -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 -jar / > path/to/JavaBridge.jar SERVLET:9676 2>$LOGFILE 1>$LOGFILE & > > I read the docs just now on promiscuous mode and I am not certain I > understand what it does. I sort of see what it's used for, but it's > not really clear exactly what it does, and consequently, what > technically doesn't happen if it's not on. > > In fact I have a nice wrapper script for starting/stopping a > standalone bridge (which frankly I think is really convenient for > people that aren't already running an app server). I will post the > script in a separate email if you want to use it in the project. > > Alan > > On Sep 13, 2009, at 5:45 PM, php-java-bridge- > > us...@li... wrote: > Hi, > > Yes, if your back end > rejects > the local fifo (in promi... > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-13 22:13:22
|
Here is a little init script I wrote that I use to start/stop a php- java-bridge standalone instance on my machine. It took quite a bit of messing around to get all the various pieces working and robust (ie logging startup failure output to the log file; properly detecting the PID of java, etc). I am not 100% confident that the line that launches the bridge is perfect; so use your own knowledge to correct it. I am talking to Jost in another thread about it at this time. JAVA=/path/to/java JAVA_BRIDGE_PATH=/path/to/JavaBridge.jar CONTAINER_DIR=/path/to/my/project #!/bin/zsh PIDFILE=$CONTAINER_DIR/runtime/jvm.pid start() { echo "Starting JVM: " LOGFILE=$CONTAINER_DIR/log/jvm.log $JAVA -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 - jar $JAVA_BRIDGE_PATH SERVLET:9676 2>$LOGFILE 1>$LOGFILE & echo $! > $PIDFILE echo "waiting 5s for JVM to finish starting up..." sleep 5 PID=`cat $PIDFILE` ps -p $PID > /dev/null if [ $? = 0 ]; then echo "Java Bridge VM started in background, detached from shell. PID=$PID" exit 0 else echo "Java Bridge VM failed to start." exit 1 fi } stop() { pid=`cat $PIDFILE` echo "Stopping JVM (alleged pid $pid}): " ps -p `cat $PIDFILE` | grep java if [ $? = 0 ]; then kill `cat $PIDFILE` rm -f $PIDFILE exit 0 else echo "PID is not a jvm. Aborting stop." exit 1 fi } case "$1" in start) start ;; stop) stop ;; *) echo $"Usage: runbridge.sh {start|stop}" exit 1 esac |
From: <php...@li...> - 2009-09-13 22:07:01
|
> r SERVLET:9676 SERVLET does set promiscuous mode. For local communication please use SERVLET_LOCAL. However, Java.inc should delete the fifo if the back end doesn't want to use it, of course. On Sep 14, 2009 12:00 AM, <php...@li...> wrote: Hi Jost- Glad to report the bug! Sadly I seem to be good at finding them ;) This is the *only* setup I use for getting the bridge going. If this either of these settings turns on promiscuous mode, I didn't do it on purpose. // PHP side (duh) define ("JAVA_HOSTS", "127.0.0.1:9676"); define ("JAVA_PREFER_VALUES", true); # required for BC with the way we wrote our php-java-bridge code. Could try to debug and fix but no downside to this. require_once('/Users/alanpinstein/dev/sandbox/showcase2/showcase2/ classes/dieselpoint/Java.inc'); // bridge side java -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 -jar / path/to/JavaBridge.jar SERVLET:9676 2>$LOGFILE 1>$LOGFILE & I read the docs just now on promiscuous mode and I am not certain I understand what it does. I sort of see what it's used for, but it's not really clear exactly what it does, and consequently, what technically doesn't happen if it's not on. In fact I have a nice wrapper script for starting/stopping a standalone bridge (which frankly I think is really convenient for people that aren't already running an app server). I will post the script in a separate email if you want to use it in the project. Alan On Sep 13, 2009, at 5:45 PM, php-java-bridge- us...@li... wrote: > Hi, > > Yes, if your back end rejects the local fifo (in promi... |
From: <php...@li...> - 2009-09-13 22:06:39
|
> I have just looked at the code, pipes are NOT used if $this->host is > not > 127.0.0.1. Ok, well I am using that IP to connect to the bridge: define ("JAVA_HOSTS", "127.0.0.1:9676"); > Why have you switched off the local channel in the back end if both > components are running on the same machine? I have no idea! There are so many options for the bridge that it is unfortunately a bit of information overload for me. I have not worked heavily on the innards of server design, especially on UNIX, and frankly I don't have a very good understanding of how unix options such as pipe/socket/channels?/etc work. I really only understand it on the IP side. I would be grateful if you could elucidate these for me, or point me to a good "guide" to them, or simply just tell me what to do :) Right now I am just running the standalone server like so: java -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 -jar / path/to/JavaBridge.jar SERVLET:9676 2>$LOGFILE 1>$LOGFILE & on the same machine as PHP. In the near future I might have the Java server on a single instance and have 2 web servers both talk to the same java bridge server over IP. Thanks! Alan > > On Sep 13, 2009 11:45 PM, "Jost Bekemeier" <jos...@go... > > > wrote: > > Hi, > > Yes, if your back end rejects the local fifo (in promiscuous mode), > Java.inc > creates a new pair and tries again in the next request. > > The fifos are only used on security enhanced linux, please disable > them by > setting JAVA_PIPE_DIR to null. > > Thank you very much for reporting this bug. -- It has been there > since 5 > years. I guess you are the first person who enabled promiscuous mode > in the > back end w/o setting the host value in the front end. > > Regards, > Jost Boekemeier > >>> On Sep 13, 2009 11:07 PM, <php...@li... >>> > > wrote: > > Oops the imag... > > us...@li... wrote: > My /tmp directory ran out of > space (or > inodes or something) to... > >>>> You can see that the bridge exhausted all inodes on /dev/shm then >>>> as > >> soon as that was ful... > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-13 22:00:45
|
Hi Jost- Glad to report the bug! Sadly I seem to be good at finding them ;) This is the *only* setup I use for getting the bridge going. If this either of these settings turns on promiscuous mode, I didn't do it on purpose. // PHP side (duh) define ("JAVA_HOSTS", "127.0.0.1:9676"); define ("JAVA_PREFER_VALUES", true); # required for BC with the way we wrote our php-java-bridge code. Could try to debug and fix but no downside to this. require_once('/Users/alanpinstein/dev/sandbox/showcase2/showcase2/ classes/dieselpoint/Java.inc'); // bridge side java -server -Xmx1200m -Dphp.java.bridge.default_log_level=5 -jar / path/to/JavaBridge.jar SERVLET:9676 2>$LOGFILE 1>$LOGFILE & I read the docs just now on promiscuous mode and I am not certain I understand what it does. I sort of see what it's used for, but it's not really clear exactly what it does, and consequently, what technically doesn't happen if it's not on. In fact I have a nice wrapper script for starting/stopping a standalone bridge (which frankly I think is really convenient for people that aren't already running an app server). I will post the script in a separate email if you want to use it in the project. Alan On Sep 13, 2009, at 5:45 PM, php-java-bridge- us...@li... wrote: > Hi, > > Yes, if your back end rejects the local fifo (in promiscuous mode), > Java.inc > creates a new pair and tries again in the next request. > > The fifos are only used on security enhanced linux, please disable > them by > setting JAVA_PIPE_DIR to null. > > Thank you very much for reporting this bug. -- It has been there > since 5 > years. I guess you are the first person who enabled promiscuous mode > in the > back end w/o setting the host value in the front end. > > Regards, > Jost Boekemeier > > On Sep 13, 2009 11:07 PM, <php-java-bridge- > us...@li...> > wrote: > > Oops the image got stripped. Here's a link to it: > > http://idisk.me.com/apinstein/Public/Pictures/Skitch/php-java-bridge_tmp_files_problem-20090913-170627.jpg > > Alan > > On Sep 13, 2009, at 5:01 PM, php-java-bridge- > > us...@li... wrote: > My /tmp directory ran out of > space (or > inodes or something) to... >> You can see that the bridge exhausted all inodes on /dev/shm then as >> soon as that was full it "failed-over" (by accident, based on a look >> at the code) to /tmp. >> >> Please advise. >> >> Regards, >> Alan >> > ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and >> focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. > http://p.sf.net/sfu/bobj-july_______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2009-09-13 21:56:01
|
I have just looked at the code, pipes are NOT used if $this->host is not 127.0.0.1. Why have you switched off the local channel in the back end if both components are running on the same machine? On Sep 13, 2009 11:45 PM, "Jost Bekemeier" <jos...@go...> wrote: Hi, Yes, if your back end rejects the local fifo (in promiscuous mode), Java.inc creates a new pair and tries again in the next request. The fifos are only used on security enhanced linux, please disable them by setting JAVA_PIPE_DIR to null. Thank you very much for reporting this bug. -- It has been there since 5 years. I guess you are the first person who enabled promiscuous mode in the back end w/o setting the host value in the front end. Regards, Jost Boekemeier > > On Sep 13, 2009 11:07 PM, <php...@li...> wrote: > > Oops the imag... us...@li... wrote: > My /tmp directory ran out of space (or inodes or something) to... > > > You can see that the bridge exhausted all inodes on /dev/shm then as > > soon as that was ful... |