the example code has
// Everything is happy. Lets kick things off
// again by checking the existence of the znode
this is misleading - it should indicate that the watches are automatically reset and therefor no call to exists is necessary
also fix this in the same doc (looks like its old detail, no longer valid), indicate that autoreset will happen on reconnect.
If the client-side ZooKeeper libraries can reestablish the communication channel to ZooKeeper, DataMonitor simply kicks everything off again with the call to ZooKeeper.exists(). If it gets an event for a znode, it calls ZooKeeper.exists() to find out what has changed.