I have a B4J server app that runs as a Windows service. I have defined a method in my Main to close the database connection when the service is stopped (i.e. the service wrapper calls the method).
Last night I was doing some testing and noticed one of my background workers happend to fire when the service was stopping (the error was related to the database being closed).
So, as per the title, is the a way to stop a BackgroundWorker from Main?
Or is perhaps stopping the webserver better (although I dont see a stop method).
Last night I was doing some testing and noticed one of my background workers happend to fire when the service was stopping (the error was related to the database being closed).
So, as per the title, is the a way to stop a BackgroundWorker from Main?
Or is perhaps stopping the webserver better (although I dont see a stop method).