|
From: <php...@li...> - 2008-11-12 21:46:38
|
Hi,
A PHP script cannot run for more than 30 seconds. However, this isn't a
> problem because all relevant information is stored in the Java backend. For
> example:
>
> jrunscript -classpath JavaBridge.jar -l php-interactive
> php-interactive> $vec = new java("java.lang.Vector"); $vec->add(1);
> php-interactive> echo $vec
> [1]
> php-interactive> die();
> ScriptError: Request$AbortException
> php-interactive> echo $vec
> [1]
>
> The above example shows that, even though the PHP continuation has been
> restarted, the script state isn't lost.
Could you provide me with a Java code example for this. I have already at
startup
(note: globally declared manager, engine, and invocable)
manager = new javax.script.ScriptEngineManager();
e = manager.getEngineByName("php-invocable");
// read php script
java.io.File sourceFile = new java.io.File(mycode.php);
java.io.FileReader fr = new java.io.FileReader(sourceFile);
e.eval(fr);
i = (javax.script.Invocable) e;
>From what you said I gather that after 30 seconds 'i' can no longer be used.
What java code do i put then to restart the PHP continuation with the
preserved state?
Thanks,
Bart
> Regards,
> Jost Boekemeier
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
--
The new is always the old. Everything that's old was once new, and
everything that's new will one day be old. The oldest thing of all is the
present, because there's never been anything else but the present. No one
has ever lived in the past, and no one lives in the future, either.
|