- Frank Frey
- PowerBuilder
- Tuesday, 28 March 2023 12:33 PM UTC
Greetings PB community,
we've been running our Reporting features in our applications succesfully for some years now via the JasperReports engine, which gets called via a PowerBuilder extension, which handles the initialization and method invoking to a JavaVM. So basically PowerBuilder -> PBNI -> JNI. We only call one Class via Powerbuilder, which uses JasperReports to handle all of the PDF generation (which report to print, parameters to set, database communication etc.).
The extension is based off the code which is described in the "PowerBuilder Native Interface Programmer’s Guide". Using the official extension for EJB related stuff (pbejb extension) is not an option, since it will be no longer available with PB2022. Since PBNI being part of the process chain, we'll post about an issue we're having lately:
It seems that after a time the JavaVM enters a state, in which it no longer can create threads leading to the user being unable to generate any more reports. Restarting the application (thus creating a new JavaVM) fixes the issue. Profiling the JavaVM via VisualVM (profiling tool distributed in the JDK) doesn't show any thread related issues (8-9 alive threads running at all times)
We initialize our JavaVM with the following properties:
We deploy a JDK in our applications, which gets used by the PBNI extension, Version JDK 7u71 (32-bit). JasperReports library used is Version 6.5.1. PowerBuilder 2021 Runtime 21.0.0.1506.
I couldn't reproduce the issue on my machine yet, even after tinkering with the properties set for the JavaVM and generating hundreds of reports in succession. Seems to happen sporadically on the user's end, though a restart of the application (and therefore a new JavaVM) fixes the issue.
Any experiences, tips or advice related to the issue would be appreciated.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.