Problem
I have got a working Maven project that I would like to deploy on my web server. I have just discovered Maven and Java is not exactly the primary language I write my projects in, so please excuse any mistakes. When I run my project, a continuous HTTP connection is established and it should permanently run on the server (Basically Push Notifications based on made requests).
Further Information
The server is running on Amazon's Linux AMI.
Proposed Solution
I pack the whole Maven project into a .jar
file and run it there.
Q1 How do I run the java file on a server (in the background) ?
Monitoring
Q2 How can I monitor which or how many processes are working in the background ? (I would NOT want the java file to run multiple times, thus PREVENTING it from establishing multiple connections)
Termination
Q3 How would I terminate any background processes, if needed (terminate the continuous http connection)?
Connected Questions
Run java jar file on a server as background process
EDIT
Possibly what I was looking for (I'll test it out and report back): https://serverfault.com/questions/152378/run-jar-in-background-on-linux