From: <php...@li...> - 2010-12-16 18:20:37
|
Hi Ely, if php crashes, send a bug report to the php developers. Otherwise please be more specific. The context is the java context. You can access the servlet and servlet context, please see our API doc for details. Except for the protocol usage mentioned at the end of the README, there are no options nor "best practices". Once connected to a servlet back end, the PHP script *is* (associated w/) the servlet. Its "best practices" apply to the PHP scripts as well. Regards, Jost Bòkemeier Am 16.12.2010 14:42 schrieb <php...@li...>: > Hello, > > I want to write a php application that can run with or without JavaBridge. > At first I want just to use Java Context to store global vars that can be > shared for all instances of running application, without need to create them > at every execution of the script (I was using session vars, but it seems not > very smart to me.). > > So, the script must run under Apache and, for example, Tomcat. I just copy > the java and WEB-INF folders (from the JavabridgeTemplate), and tried the > following: > > > > require_once ("java/Java.inc"); > > try { > > $ctx = java_context(); > > } > > catch (Exception $e) { > > $ctx = NULL; > > print $e->getMessage(); > > } > > > > Using $ctx as a "flag " along the application to use or php session or java > context to store the vars. But the script crash at java_context(). :-( > > > > Is there some "best practice" or pattern to make this? Do you think the idea > is valid? > > > > Thanks for help, > > Ely Matos > > > > > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |