From: <php...@li...> - 2011-12-15 09:33:07
|
Hi Jost, I've tried to set it up, but without success so far. Sorry for maybe repeating the question, but I still find below issues unclear. > If you change these to use getter/setters, your problem is solved. Where should these getter/setters be defined? Within Java.inc - if yes then I have again the same problem of having different "environments" for different instances of bridge. > It's not static.The bindings are created in the current top-level > environment, not in the global environment. Since there is no specific namespace defined in Java.inc, how can we change/influence current "top-level environment" of Java.inc so that we can have two separate instances of client? I always stuck on this part because only of first call client is created and on subsequent calls existing one is returned. 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; } btw. from what I understood, as far as you know, this hasn't been tried/tested so far? Kind Regards, Zvonimir 2011/12/12 <php...@li...> > Hi Zvonimir, > > The only problem are the three globals, JAVA_SERVLET, JAVA_HOSTS and a > global to prevent the shutdown function from running too early. > > If you change these to use getter/setters, your problem is solved. > > > > client that is returned is static variable > > It's not static.The bindings are created in the current top-level > environment, not in the global environment. > > > 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 > |