1. Sailaja Sumanam
  2. PowerBuilder
  3. Thursday, 28 March 2024 13:22 PM UTC

Hi,

I have setup NSSM to invoke my PB application. The issue I am facing is that:

I have written code in close query event of my window that opens up from application open event. Code in the close query will trigger the timer event and then go ahead with the closure steps to update few details in the DB and this will return code of 1 not to trigger the close event until the necessary updates are done. Once the DB updates are done I am calling the close function to close the application.

When I run the application through PB IDE and then close the application through Cross button on the top, the close query is getting triggered and in turn timer event is getting triggered. But somehow through NSSM if I Stop the service, it is triggering the close query ( verified this with logging a message in DB) but the timer event is not getting triggered.

How can NSSM wait for sometime (so that in the mean time, the DB updates would be done) after receiving the STOP signal?

Thanks,

Sailaja.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 28 March 2024 15:01 PM UTC
  2. PowerBuilder
  3. # 1

Hi Sailaja;

  As NSSM (or what ever service software) is running your PB App as an O/S "service" and therefore has no GUI interface with any App user. Thus, your PB App as a service should only be built & use Non-Visual object classes. Since there is no GUI allowed, you need to code your PB App accordingly.  HTH

Regards .. Chris

Comment
  1. Roland Smith
  2. Sunday, 31 March 2024 22:48 PM UTC
The problem they are pointing out is that if you Stop the service, the PB exe is terminated, even if it is in the middle of doing something. There isn't any notification between the service manager and the PowerBuilder code. PBNIServ supports all control functions, including Start, Stop, Pause, and Resume.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.