While investigating various java charting packages, a person from a certain commercial package made this comment regarding JFreeChart.
"For certain limited applications it works fine. We have found however that it is not thread safe within a J2EE application. If you are using it in a J2EE environment that has very few concurrent hits ( like a simple dept. charting app) there is little chance for a data race, deadlock or corruption of immutable
members."
Anyone care to comment.
J2EE Thread Safety?
Re: J2EE Thread Safety?
Certainly they didn't submit a bug report (or a patch). What they say may be true, though...for now.
I'm neither a J2EE guru nor a multi-threading guru, but I can say that the current version of JFreeChart does NOT synchronise access to the datasets. So if you update a dataset in one thread while the chart is being redrawn in another thread...well, you might get problems. I'm looking into a solution for this...and I'm happy to accept the advice of anyone out there who has more experience of multithreading than I do.
In the mean time, there's a nice example of a "simple dept. charting app" at the NetBeans QA site:
http://qa.netbeans.org/bugzilla/graphs/summary.html
Regards,
DG.
I'm neither a J2EE guru nor a multi-threading guru, but I can say that the current version of JFreeChart does NOT synchronise access to the datasets. So if you update a dataset in one thread while the chart is being redrawn in another thread...well, you might get problems. I'm looking into a solution for this...and I'm happy to accept the advice of anyone out there who has more experience of multithreading than I do.
In the mean time, there's a nice example of a "simple dept. charting app" at the NetBeans QA site:
http://qa.netbeans.org/bugzilla/graphs/summary.html
Regards,
DG.