Injecting the ZK instance is just plain good practice because it allows you
to inject a mock Zookeeper during testing.  Without doing that, it is almost
impossible to test various failure scenarios.

On Sun, Jun 7, 2009 at 4:58 PM, Satish Bhatti <> wrote:

> In principle I could create a single ZooKeeper
> client object and pass it in to the objects, so then I would only have a
> single ZooKeeper instance.

Ted Dunning, CTO

Reply via email to