Hi,

I am using the Zookeeper Java client class from Scala for some synchronous 
communication (no watches, no async). Fairly simple. Every now and then my 
application needs to use ZK and then creates a client, does its thing, and 
closes the client. 

What happens though is that I keep having two threads for every client I've 
ever opened, which slowly adds up. So now I turned the client into a Singleton, 
but that acts as a bottleneck (remember, I do/need sync communication).

Any thoughts? From my perspective, the close() method on ZooKeeper should close 
and clean up the threads. Tested under OS 10.6.4 and Ubuntu 10.04 with the Sun 
JDK.

Thanks,

Maarten

Reply via email to