Reputation: 12484
I got a GWT version of the java Pet Store working on my machine, and I'd like to implement an exteneral Java program that is on another machine, and just displays "On" or "off" - so when I turn off the java Pet Store on one machine, it will then switch from "On" to "Off" on the other machine.
How would I go about doing this? I've played with RMI a little, but it's quite cumbersome. Any tips or advice is appreciated.
Upvotes: 0
Views: 1110
Reputation: 674
I'd create a program to check the running processes on the Pet Store machine to see if the application is still running and expose that capability to remote machines.
-Checking whether Pet Store is still running
It may be a bit overkill, but if you wanted, you could set up the remote check using web services. I personally like Axis2.
Upvotes: 1
Reputation: 160191
If it's a web app, just use something like HttpClient to hit a known address; if you don't get a response, it's down.
Upvotes: 1