Using Notifo push notifications to tell you when java breaks down

25 Jun 2010

notifo logoIf you haven’t heard of it, you should check it out: took me about 60 seconds to create an account, download the iphone app and send myself a test message. They have android and blackberry clients in the works as well.The API is straight forward and is easily callable via curl. I have a project I am working on that is currently relying on some buggy libraries (don’t ask) which cause the JVM to periodically exhaust it’s memory. I can alert myself when this happens using notifo simply by starting the JVM with -XX:OnOutOfMemoryError=" failure 'stupid thing failed again'" is the official docs on that flag:

-XX:OnOutOfMemoryError="<cmd args>;<cmd args>
)”Run user-defined commands when an OutOfMemoryError is first thrown. (Introduced in 1.4.2 update 12, 6 here is the simple shell script i am using:
curl -k -u ${USERNAME}:${APIKEY} \-d "to=${USERNAME}&msg='$2'&title='$1'" \
This is an extremely trivial example, but you can probably see the potential for sending yourself notifications easily.

update: check out my notifo java client and notifo log4j appender