0

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.

Caffeinated
  • 11,134
  • 39
  • 115
  • 205

2 Answers2

1

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.

Dave Newton
  • 156,572
  • 25
  • 250
  • 300
1

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

-Executing the check remotely

It may be a bit overkill, but if you wanted, you could set up the remote check using web services. I personally like Axis2.

Community
  • 1
  • 1
Teddy Yueh
  • 664
  • 3
  • 6