From: <php...@li...> - 2018-02-12 18:47:06
|
Hi Peter, you're right. The bridge wastes a few CPU cycles to find the channel for all further communication. Your patch uses a hard coded value (9267). It might work for you, but it will not work in general. In order to find the channel to redirect further communication to, PHP needs to retrieve the "redirect" information from the back end. At the moment the bridge uses a PUT request to the servlet engine HTTP port. If you think this is too slow, please feel free to submit a patch. Although it *is* possible to hard code the redirect channel name in Java.inc, I think it is better to calculate it dynamically. The use case is: User deploys JavaBridge.war, copies the generated directory (and with it the generated Java.inc with the channel name @9268) to apache htdocs. User re-deploys JavaBridge.war while port 9268 is in use by some other application (probably some other JavaBridge instance). Channel name of the back end is now @9269, while apache still uses @9268 hard coded in Java.inc. User gets an error and we get a support request. And I don't like support requests... Regards, Jost Bökemeier |