20Jan Wed2010 | Making java server apps suspend/resume aware
I'm looking for an easy way for a server-side Java app to
recognise that it has just resumed, and should handle that event
(wait for the network to return, reconnect to things).
I don't see any easy way to do this, other than have a shell
script to run on power resume which somehow notifies the app
(touches a file, probably; queues something). The java app has to
look for this file and react (polling, bad), or when it encounters
network problems look at this file and say "did we just resume?
Maybe the lan isn't live".
Life would be simpler if java apps could subscribe to power/LAN
events
|