I have two projects, project1 and project2.
Case 1: Project1 and Project2 are on the same machine. If project2 crashes or terminates, Project1 should restart the project2.
Case 2: Project1 and Project2 are on different machine. If project2 crashes or terminates, Project1 should restart the project2.
These are java project.
How should I perform the aforementioned task?
EDIT:
I was thinking of the following solutions:
- If the projects are on the same machine then I can keep the Project2 in the classpath of Project1 and restart the project2 from project1. But, there is a problem. Then these two entities will become a single program.
- If these projects are on different computers then I could have some third program running along with project2 which I will assume will never crash. And this third program could revive the project2.
Not sure, about my solution. Your input is required.