continuuity/tephra — pull request #13 by chtyim (2014-07-21 20:04:49+00:00)
Title: Do lazy initialization of PooledClientProvider to avoid guide injection error.

- Guice injection error could raised if the TransactionServiceClient instance is being injected to another object.
- During the instantiation of TransactionServiceClient, which in turn call PooledClientProvider.initialize(). The initialization would fails if it is not yet connected to ZooKeeper, which would be the case when still constructing the Guice Injector, depending on whether the DiscoveryServiceClient do auto-connect to zookeeper or not, which is not guaranteed.
- It's also better not to do resource related initialization in Guice constructor, as suggested in Guice guideline.