It depends on your architecture. For simplicity you can start it in the same thread of your application. But if for some reason you have multiple applications using the same MinaTaskServer, you will need to start it separately or in another thread to be able to kill your application without killing the TaskServer.