To start the service, I know one uses new MyService().run(args). How to stop it?
new MyService().run(args)
I need to start and stop programmatically for setUp() and
setUp()
Keep the environment variable around and add the following method to your application:
environment
public void stop() throws Exception { environment.getApplicationContext().getServer().stop(); }
Now you can call myService.stop() to stop the server.
myService.stop()