Mapepire-IBMi / mapepire-server

Server-side support for Code for IBM i
GNU General Public License v3.0
24 stars 8 forks source link

DoVE: ENDDBMON never happens if the prepareStatement call fails #19

Closed davecharron closed 9 months ago

davecharron commented 9 months ago

https://github.com/ThePrez/CodeForIBMiServer/blob/c94aa56f8f1058a79de434157e6c429b708b5208/src/main/java/com/github/theprez/codefori/requests/DoVe.java#L46

With the current code flow, if the prepare of the statement to VE fails for any reason (ex: query of a non-existent file), we drop into the catch block, skipping over the call to ENDDBMON. As a result, any subsequent VE actions on the job fail at the point that the STRDBMON is called, because the job is still being monitored from the failed attempt. The fail out path needs to ensure that the job monitoring is ended.

davecharron commented 9 months ago

Fixed in version 1.4.8