How to handle threads spawned by Parser

Scott Klement's open source interface to the POI HSSF/XSSF Spreadsheet Project for RPG Programmers. http://www.scottklement.com/poi/
Post Reply
BrianKellyVT
Posts: 1
Joined: Thu Oct 27, 2022 8:18 pm

How to handle threads spawned by Parser

Post by BrianKellyVT »

Hi Scott,

We currently utilize the XLPARSER4 program successfully but I have noticed something that has me curious. I'm no Java programmer, and my knowledge of Java on the i is limited, so apologies if this question isn't worded properly.

What I've noticed on our production boxes is when we ultimately call xlparser4 via one of our RPG programs, a JVM is spun up associated to that job (as can be seen in WRKJVMJOB) and multiple threads are created/spawned to that job.

On our system, we have never-ending jobs that handle requests - as a way to better deal with reuse for performance. Sometimes, spreadsheet imports (utilizing XLPARSER4) go through these jobs. Additionally, our QZDASOINIT jobs also use this routine, and those jobs get reused by the system and do not end with each request.

While looking at these jobs, I can see threads associated with these jobs persist - sometimes days after the parser was used. To that point, I'm worried that threads are 'active' on many jobs, but not being used and the potential impact that would have to the system overall. In other words, nothing is cleaning them up.

Is there a way to end the threads/and-or the JVM instance associated with the job without ending the job itself? In looking at the procedures within the xlparser4.rpgle program - I don't see any close routines but suspect that with Java it would not be needed.

Thanks in advance for any guidance you can provide.
Post Reply