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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(3) |
2
|
3
(4) |
4
(8) |
5
|
|
6
(1) |
7
(2) |
8
(2) |
9
(1) |
10
|
11
|
12
(2) |
|
13
(11) |
14
|
15
|
16
|
17
(3) |
18
|
19
|
|
20
|
21
(4) |
22
(2) |
23
(7) |
24
(8) |
25
(2) |
26
(1) |
|
27
(2) |
28
(11) |
29
(2) |
30
|
|
|
|
|
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 |