From: <php...@li...> - 2011-12-12 09:33:52
|
Hi, Sorry, maybe I do not understand exactly the idea you are suggesting. Yes, introduction of namespace for these constants would solve initial issue of having "variable" JAVA_SERVLET and JAVA_HOSTS within Java.inc. But, when java_context is called: function java_context() { $client=__javaproxy_Client_getClient(); return $client->getContext(); } it calls __javaproxy_Client_getClient function that returns current client: function __javaproxy_Client_getClient() { static $client=null; if(!is_null($client)) return $client; if (function_exists("java_create_client")) $client=java_create_client(); else { global $java_initialized; $client=new java_Client(); $java_initialized=true; } return $client; } client that is returned is static variable that it is created only once and reused in subsequent calls. So I think that further customizations of Java.inc are needed to remove static instances of objects. Or your suggestion for use of namespace is somehow broader and covers also this issue? Kind Regards, Zvonimir 2011/12/10 <php...@li...> > Hi, > > > Within Java.inc, constants JAVA_HOSTS and JAVA_SERVLET are used and then > > based on them servlet is retrieved > > PHP's define() ignores namespaces and creates bindings in a global scope. > > Please modify Java.inc so that it looks for those bindings in the > current namespace: > > namespace t1; > const JAVA_SERVLET=... > const JAVA_HOSTS=... > include "Java.inc"; > > should do what you want. > > > Regards, > Jost Bökemeier > > > ------------------------------------------------------------------------------ > Learn Windows Azure Live! Tuesday, Dec 13, 2011 > Microsoft is holding a special Learn Windows Azure training event for > developers. It will provide a great way to learn Windows Azure and what it > provides. You can attend the event by watching it streamed LIVE online. > Learn more at http://p.sf.net/sfu/ms-windowsazure > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |