|
From: <php...@li...> - 2008-11-14 09:23:39
|
Hello!
Thanks for your reply and your explanation of the problem. We are looking forward to 5.3.3 :-)
> java(...)
> // workaround for a 5.3.2 bug which must execute the second java statement within 30 seconds
> java(...)
> wait(...)
> java(...)
> However, I am curious why the wait() for more than 30 seconds is necessary?
I can think of two possible explanations in our current setup.
Firstly, we are making use of the JavaBridge in a backend daemon PHP script which runs indefinitely polling a message queue at regular intervals. Handling a message usually involves making one or more java()-calls. The interval between java()-calls is therefore dependent on the message frequency. Using PHP for this kind of backend business logic is of course a rather bad idea, but having to work with an existing architecture, we don't really have an option.
Maybe this issue could be resolved on the user level by flushing the JavaBridge somehow before the daemon goes back to sleep waiting for its next message?
Secondly, the external Java API which we are calling using the JavaBridge is at times very, very slow (response times of up to several minutes). For example:
function getExternalObjectName($externalObjectId)
{
$externalObject = java('...')->getObject($externalObjectId);
// the script stalls for one minute waiting for the above call to finish
return java_values($externalObject->getName());
}
Best regards,
Johannes Staffans
itCampus GmbH
|