Hi Sreenath,
There are a few things you need to do, none of them to hard but missing any one of them can cause problems. Hopefully I will remember to list them all here.
Your image needs to have ST: Server Workbench loaded.
You need to add two class side methods to your application class:
starting
"This is the entry point into the user code for the service.
First register the application. This sets the service status to
RUNNING and establishes the callback for stopping the service application.
Then create and start the server object."
"Tell windows where to go when the service is stopped."
AbtNtServiceInterface default registerService: self name stopSelector: #stopping.
"Create an instance of your main class and call a method to get things going."
YourMainServerProgram startServer.
stopping
"This is run by the system when the service is being stopped.
Smalltalk will exit at the end of the Server object #stop method."
"Do what you need to do to exit cleanly."
Build/package an XD image. It is too much to go into here but if you need more help, ask again.
I have a package called InstallService
Vast Goodies. It is a small VA Smalltalk program that you can use to install your program as an NT Service. Instantiations has something too but mine does a little more in the way of setting up your service.
This should get you started. Again if you need more help, just ask.
Lou
On Thursday, February 4, 2016 at 2:24:11 AM UTC-5, Sreenath G K wrote:
Hi All,
I wanted to run one of my batch process as a service. Any one can shed some light on to this.
Thanks in Advance.
Best Regards,
Sreenath
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
To post to this group, send email to
[hidden email].
Visit this group at
https://groups.google.com/group/va-smalltalk.
For more options, visit
https://groups.google.com/d/optout.