Well i have a game server now up and running on my local development machine but i want to deploy it to a real servermachine. The easiest way would be to just transfer the jar file to the server and run it with java -jar server.jar. But i want to reliably deploy this jar to a server and keep it running like a daemon. The above command terminates if the server.jar crashes or it runs out of memory but i does not restart the server. Second i want it to be deployable to multiple physical servers. So the server.jar is startet on many physical machines and keep running as daemons.
I thought about running the server inside a servlet in Java EE but i think that would not work because Java EE requires you application does not create a socket by itself. And because i use kryonet as a networking library i cant prevent my app from doing it/i have no idea how to overcome that issue.
Is there any way i can do what i wanted to do? Maybe any application suggestions or frameworks build for this task?
Thank you