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
(1) |
|
2
|
3
|
4
|
5
(1) |
6
(2) |
7
(4) |
8
(1) |
|
9
(1) |
10
(10) |
11
(5) |
12
|
13
(1) |
14
(1) |
15
|
|
16
|
17
|
18
|
19
(4) |
20
(1) |
21
|
22
|
|
23
|
24
|
25
(4) |
26
|
27
(10) |
28
|
29
|
|
30
|
|
|
|
|
|
|
|
From: <php...@li...> - 2007-09-10 22:03:49
|
Why not just include java.inc first? Then, even if it does use variables they you've set, then you'll overwrite the value and it won't be an issue. I can't see any reason why you couldn't do the include at the top of the page. I always put it just after session_start();
--Nathan Shaskin
Compliance Publishing
php...@li... wrote: > -----Original Message-----
> From: php...@li...
> [mailto:php...@li...]
> On Behalf Of php...@li...
> Sent: Montag, 10. September 2007 19:43
> To: php...@li...
> Subject: Re: [Php-java-bridge-users] PLEASE name globally
> visiblevariablesvery unique!
>
> ...
> Other libraries use similar code in their setup. I don't see
> a problem
> with this. I don't even understand the problem.
Sigh! My last attempt before giving up hope:
I have code like that roughly looks as follows.
---------------
...
$version = '1.0.0'; // this may also - say - be passed in as
parameter.
...
require_once(
);
...
...
// followed my some other code, that expects to see the
// variable value defined at the begin (or being passed in):
...
read_file('foo_bar_'.$version.'.xyz'); // supposed to read
'foo_bar_1.0.0.xyz'
...
---------------
then this code would now suddenly search for 'foo_bar_5.2.3.xyz'
(which most likely will not exist and hence this method fails), since
the innocently looking require_once(...) has modified the $version
variable during the check for the current php-version.
Why is it so hard to understand, that I simply ask, NOT to use a
variable called "$version"? As we have seen this is a very likely
variable name, may thus already exist and its modification can lead to
unexpected results.
I guess your answer will now be: MY code should not use a variable
called "$version", but since this is code that sits in a third party
library that I do not want to modify (since I then would have to
repeat that same modification in each new version) this is not an
option.
Hope I could make myself clear and if not I don't care any more...
Michael
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.
|
|
From: <php...@li...> - 2007-09-10 20:46:59
|
> -----Original Message-----
> From: php...@li...=20
> [mailto:php...@li...]=20
> On Behalf Of php...@li...
> Sent: Montag, 10. September 2007 19:43
> To: php...@li...
> Subject: Re: [Php-java-bridge-users] PLEASE name globally=20
> visiblevariablesvery unique!
>=20
> ...
> Other libraries use similar code in their setup. I don't see=20
> a problem=20
> with this. I don't even understand the problem.
Sigh! My last attempt before giving up hope:
I have code like that roughly looks as follows.
---------------
...
$version =3D '1.0.0'; // this may also - say - be passed in as
parameter.
...
require_once(<php-bridge's Java.inc>);
...
<do somethings with the java-bridge>
...
// followed my some other code, that expects to see the=20
// variable value defined at the begin (or being passed in):
...
read_file('foo_bar_'.$version.'.xyz'); // supposed to read
'foo_bar_1.0.0.xyz'
...
---------------
then this code would now suddenly search for 'foo_bar_5.2.3.xyz'
(which most likely will not exist and hence this method fails), since
the innocently looking require_once(...) has modified the $version
variable during the check for the current php-version.
Why is it so hard to understand, that I simply ask, NOT to use a
variable called "$version"? As we have seen this is a very likely
variable name, may thus already exist and its modification can lead to
unexpected results.=20
I guess your answer will now be: MY code should not use a variable
called "$version", but since this is code that sits in a third party
library that I do not want to modify (since I then would have to
repeat that same modification in each new version) this is not an
option.
Hope I could make myself clear and if not I don't care any more...
Michael
|
|
From: <php...@li...> - 2007-09-10 17:47:08
|
Hi,
> DeclaredMethods (according to getDeclaredMethods):
> - doSomething([Ljava.lang.String;)
> - doSomething(java.util.List)
you could use java_inspect($object), which also prints the methods. :)
> I've tried to pass a single string the following ways:
> - java.lang.reflect.Array with java.lang.String
> - java.util.Arrays->asList with array('...')
> - ArrayList, how do I cast this to a java.util.List ?
All wrong. :) You need to pass a typed array.
> I keep getting a NoSuchMethodException.
Just pass a Java array or let the PHP/Java Bridge coerce the argument. For example:
$varargs = array("1", "2", "3");
or
$varargs = array (new Java("java.lang.String", "1"), new Java("java.lang.String", "2"), ...);
should work.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? www.yahoo.de/mail
|
|
From: <php...@li...> - 2007-09-10 17:42:34
|
Hi Michael,
> > This means that we have to prefix all *temporary* variables
> > with java_. I don't think this is a good idea.
>
> Well - if you want to similar effect in other environments, then I
> guess this would be needed.
I don't think so. People shouldn't write unnatural code. I have never seen prefixes for temporary
variables such as:
for($myLib_i=0; $myLib_i<100; $myLib_i++) {...}
> that $version was actually the only var that is used in that way.
Other libraries use similar code in their setup. I don't see a problem
with this. I don't even understand the problem.
If you use the following code:
$i=something;
require_once("some_lib.php") ::= { ... for($i=0; $i<100; $i++) ... }
doSomethingWith($i);
then there's a bug in your code, I think. Your global variable "$i" should be named "$myApp_i",
not simply "$i".
Regards,
Jost Boekemeier
Wissenswertes für Bastler und Hobby Handwerker. BE A BETTER HEIMWERKER! www.yahoo.de/clever
|
|
From: <php...@li...> - 2007-09-10 17:31:12
|
Hi, according to http://msdn2.microsoft.com/en-us/library/ms740668.aspx the winsock error #10054 means: Connection reset by peer. An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET. Isn't it possible to shut down the back end? How do you stop tomcat? However, this is not a problem with the PHP/Java Bridge. The bridge uses pfsockopen() to create a persistent connection to the back end. PHP can and should detect if the back end has been restarted or not. Regards, Jost Boekemeier Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: http://de.yahoo.com/set |
|
From: <php...@li...> - 2007-09-10 16:02:52
|
Whenever the PHP/JavaBridge on Apache has lost connection to Tomcat, then that was it! If - for example - Tomcat has been brought down and restarted, then the next time I want to call some java-code I get the following notice: -------------------------------------------------------------- Notice: fwrite() [function.fwrite]: send of 117 bytes failed with errno=3D10054 An existing connection was forcibly closed by the remote host. in C:\Program Files\xampp\htdocs\test\Java.inc on line 740 protocol error: , Invalid document end at col 8. Check the back end log for details. Notice: fwrite() [function.fwrite]: send of 11 bytes failed with errno=3D10054 An existing connection was forcibly closed by the remote host. in C:\Program Files\xampp\htdocs\test\Java.inc on line 746 -------------------------------------------------------------- In other words, if one side goes down, one has to bring down the other as well and has to restart both. Only then they will "find" each other again. Couldn't the bridge try to reconnect? I find it a bit tedious and also not very robust, that I always have to bring down both sides in lock-step and can't simply let one run all the time. Michael |
|
From: <php...@li...> - 2007-09-10 14:32:44
|
I think you could/should use an array(). For example the code below displays 12:
--- varargs.php ---
<?php require_once("http://localhost:9092/JavaBridge/java/Java.inc");
java_require("varargs.jar");
$varargs = new java("Varargs");
$t1 = new java('Varargs$Test', 1);
$t2 = new java('Varargs$Test', 2);
echo $varargs->varargs(array($t1, $t2));
?>
--- Varargs.java ---
public class Varargs {
public static class Test {
public int i;
public Test (int i) {
this.i = i;
}
public String toString() {
return String.valueOf(i);
}
}
public static String varargs(Test ...tests) {
StringBuffer buf = new StringBuffer();
for (Test test : tests) {
buf.append(test);
}
return buf.toString();
}
public static void main(String[] args) {
System.out.println(varargs(new Test(1), new Test(2)));
}
}
Peter
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
|
|
From: <php...@li...> - 2007-09-10 10:32:10
|
Hi Jost,=20
> -----Original Message-----
> From: php...@li...=20
> [mailto:php...@li...]=20
> On Behalf Of php...@li...
> Sent: Montag, 10. September 2007 11:32
> To: php...@li...
> Subject: Re: [Php-java-bridge-users] PLEASE name globally=20
> visible variablesvery unique!
>=20
> ...
> how can a temporary variable, which is used only within the=20
> Java.inc block, break your application?
OK - maybe "global" was the wrong term here. It's not really "global"
in the PHP sense. Apologies!
But it is "global" in the sense, that obviously the code, that I am
using (a widget library for which I was creating additional widgets
that then get dynamically loaded) creates an environment into which
that widget code gets dynamically loaded and embedded and in that
environment there obviously already exists a variable "$version".
> ...
> $version is a variable which is used only in the if() block.=20
> Since php currently doesn't support name spaces, it is=20
> created in the global environment instead. Whether or not an=20
> included library uses temporary bindings in the global=20
> environment should not affect a well-written application.
If there already exists a variable "$version" OUTSIDE (i.e. before)
the if-block, then obviously it takes that variable (and does not
create and use a new local var) and so overwrites its value, i.e. that
statement has an outside noticable effect.
> This means that we have to prefix all *temporary* variables=20
> with java_. I don't think this is a good idea.=20
Well - if you want to similar effect in other environments, then I
guess this would be needed. However, I just checked again, it seems
that $version was actually the only var that is used in that way.
Everything else seems to be used inside functions or classes and
should thus not harm. And all others var and constants that I found
during my quick glance ($JAVA_BASE, JAVA_HOST, JAVA_SERVLET,
JAVA_LOG_LEVEL, etc.) are already named such, that they are rather
unlikely to clash (and if they do, the names already suggests where to
look...). I hope I didn't miss any, though.
=20
> > I even suggest to NOT use any variable here, but to write=20
> this snippet=20
> > as
> > follows:
> > ...
> > if ((version_compare("5.1.2", phpversion(), ">"))) {
> > $msg =3D '<br><strong>PHP '.phpversion().' too=20
> old.</strong><br>\nFor
>=20
> How does this help? The temp var $msg is also created in the=20
> global environment.
Agreed - one could even compose the msg directly in the method call
thus avoiding the declarartion and use of $msg, but since that
variable is only used in the subsequent die(...) anyway, I did not
consider that an issue, while the use (and possible modification) of
"$version" obviously IS an issue and should be avoided.
Look, I didn't mean to cause a major headache here. I only reported a
problem that I banged into using the PHP/JavaBridge in my environment
and a IMHO really minor change, that allows to fix this and avoid
similar griefs for others in the future.=20
Michael
|
|
From: <php...@li...> - 2007-09-10 09:32:28
|
Hi,
> code, I didn't actually *use* anything from it, yet, just including it was
> enough to break my application.
how can a temporary variable, which is used only within the Java.inc block, break your
application?
> After some quite substantial investigation I had to learn, that the reason
> was, that the Java.inc file uses a globally visible variable "$version"
$version is a variable which is used only in the if() block. Since php currently doesn't support
name spaces, it is created in the global environment instead. Whether or not an included library
uses temporary bindings in the global environment should not affect a well-written application.
For version 4.2.3 we could turn the code block into a lambda() and immediately invoke it. This way
the bindings are created local to the anonymous function and do not pollute the global env.
> Apparently some other code that I am using also checks for such a variable.
> It expects to find 1.0.0 but now found 5.2.3 (the PHP version I am using)
Isn't it possible to keep your *global variables* in a separate map? BTW: I would prefix all
global variables with appname_ to avoid clashes with other libs. Temporary bindings don't need to
prefixed, though.
> if you use (and then leave around) such globally visible variables, then
> PLEASE make their names VERY unique.
This means that we have to prefix all *temporary* variables with java_. I don't think this is a
good idea.
However, we can and probably should turn global code blocks into anonymous functions and invoke
them immediately.
> I even suggest to NOT use any variable here, but to write this snippet as
> follows:
> ...
> if ((version_compare("5.1.2", phpversion(), ">"))) {
> $msg = '<br><strong>PHP '.phpversion().' too old.</strong><br>\nFor
How does this help? The temp var $msg is also created in the global environment.
Regards,
Jost Boekemeier
__________________________________
Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen. www.yahoo.de/clever
|
|
From: <php...@li...> - 2007-09-10 09:19:52
|
Hi,
I'm having some problems with a Java 1.5 feature.
I have a java class with a function like:
public void doSomething(String...) {
...
}
DeclaredMethods (according to getDeclaredMethods):
- doSomething([Ljava.lang.String;)
- doSomething(java.util.List)
I've tried to pass a single string the following ways:
- java.lang.reflect.Array with java.lang.String
- java.util.Arrays->asList with array('...')
- ArrayList, how do I cast this to a java.util.List ?
I keep getting a NoSuchMethodException.
Any suggestions?
Setup:
- Apache 2.2.4
- PHP 5.2.3
- Tomcat 5.5.17
- Java Bridge 4.2.2
|