News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ant Phillips' Blog:
Singletons, BIRT, Theads and PHP
February 18, 2009 @ 12:55:47

In doing some work with Zero (PHP in Java) and the Eclipse Business Intelligence and Reporting Tools project, Ant Phillips had some troubles with multithreaded PHP processes and wanting them all to use the same BIRT instance insted of spawning their own.

The problem is that BIRT needs to be started once, and only once, in any given process. Once it has been started up, then it is plain sailing to load reports and render them to HTML. The BIRT runtime should be kept around until the process shuts down.

Two problems came up with this approach - if each PHP process makes its own BIRT process any settings/current data will be wiped out and the BIRT instance would go away whenever the PHP script finishes. He found something that solves both of these problems - the Zero Global Context. Its a "storage area" that can contain just about anything. He used it to store the BIRT runtime until its told to finish and die off.

1 comment voice your opinion now!
birt java zero multithread singleton process global context


blog comments powered by Disqus

Similar Posts

Sebastian Bergmann's Blog: Isolated (and Parallel) Test Execution

DeveloperDrive.com: 5 PHP Security Measures

IBM developerWorks: Java and PHP technology on AIX - Integrate the Java business application w/ DB2

Elizabeth Smith's Blog: Callicore Desktop - A PHP-GTK2 Framework

Lukas Smith's Blog: The state of the PHP5 CMS...?


Community Events





Don't see your event here?
Let us know!


release laravel framework tool library series voicesoftheelephpant package podcast update security version symfony composer mvc opinion language interview introduction community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework