1. Sailaja Sumanam
  2. PowerBuilder
  3. Tuesday, 27 February 2024 17:05 PM UTC

Hi,

 

I would like to know how can we configure power builder application as windows service that gets triggered as per the setup. I have gone through few posts earlier regarding this and understand that we would need a third party tool like NSSM / PBNIServ that can handle this. Could you please help me understand the step by step process in achieving this as all other posts we have seen so far are not giving handful information.

 

Thanks,

Sailaja.

Sailaja Sumanam Accepted Answer Pending Moderation
  1. Thursday, 21 March 2024 12:21 PM UTC
  2. PowerBuilder
  3. # 1

Chris Pollach @Appeon - When you setup NSSM to invoke PB application in the background,

If we stop the service, then I expect that the application stops executing in the background. Please correct me if I am wrong here.

If we want to stop that windows service and then restart, how can we make sure that the current process (any batch that is being processed needs to be finished) is finished and then the PB application exits? Is there any setting available in NSSM that can allow the application to finish its current processing and then exit?

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 27 February 2024 21:40 PM UTC
  2. PowerBuilder
  3. # 2

Hi Sailaja;

  FWIW: I have used NSSM for over two decades now for PB based "Service" Apps. Love it and the free price is great too!   ;-)

Regards .. Chris

Comment
  1. Sailaja Sumanam
  2. Wednesday, 27 March 2024 17:48 PM UTC
Hi Chris Pollach @Appeon

Sorry but I did not get under which parameter you asked me to send a STOP command to PB App.

My requirement is that : In case the service that is setup through NSSM is stopped, then the application is terminating abruptly but I dont want this to happen. Instead there is code written when the PB app is triggered from front end, that user has a chance to Close W/Wait option where it will trigger the timer(5) and then finish the current batch. Then the application gets terminated.

How can I achieve this using NSSM ?

I dont see any option in NSSM which allows me to send some command except the arguments which are required on App login. Please let me know if there is any parameter that needs to be set which can trigger the existing code that would do Close W/ Wait option like it does from front end.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 27 March 2024 18:29 PM UTC
Hi Sailaja;

If you would like to "Quiese" (orderly shutdown of the PB App Server vs a "hard Stop", you can send a message to the Server from your PB Client App via ...

1) DDE: http://chrispollach.blogspot.com/2023/04/dde.html

2) Send() Command: http://chrispollach.blogspot.com/2019/11/sendmsg.html

3) TCP/IP: http://chrispollach.blogspot.com/2023/04/socket.html

HTH

Regards .. Chris
  1. Helpful
  1. Roland Smith
  2. Wednesday, 27 March 2024 18:47 PM UTC
PBNIServ supports Stop, Pause, and Resume commands from the Service Manager or the NET command.
  1. Helpful
There are no comments made yet.
Simon Reichenbach Accepted Answer Pending Moderation
  1. Tuesday, 27 February 2024 20:33 PM UTC
  2. PowerBuilder
  3. # 3

Hi Sailaja

If you just want to run your (existing) PB application in the background (as a Windows Service) I can also suggest SrvAny (https://github.com/birkett/srvany-ng) or FireDaemon (https://www.firedaemon.com/download).

PBNIServe on the other hand allows a much more advanced and proper integration, but will also be more complicated to use.

Regards, Simon

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 27 February 2024 19:00 PM UTC
  2. PowerBuilder
  3. # 4

A Windows Service usually is started automatically at boot up time and runs in the background whether someone is logged in or not.

If you have a specific question about PBNIServ, you can click the Email button in the upper right corner of the web page.

https://www.topwizprogramming.com/pbniserv_download.html

 

 

 

Comment
  1. Christopher Craft
  2. Tuesday, 27 February 2024 23:48 PM UTC
Roland,

Does PBNIServ support threads yet (SharedObjects)? I have been using PBService for years and it works great but they stopped supporting it a few years ago so I can't recommend it to Sailaja.

Chris
  1. Helpful
  1. Roland Smith
  2. Wednesday, 28 February 2024 13:27 PM UTC
Unfortunately PBNI doesn't support SharedObjects multi-threading. I'd be interested in seeing how PBService works.

I have another Windows Service tool:

https://www.topwizprogramming.com/windaemon.html

The service is a C++ exe that communicates with a PB exe. You could use SharedObjects with that method.
  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.