private class ManagedConnectionObserver implements ConnectionObserver {
private ConcurrentHashMap<ServerCnxn,ConnectionBean> map=
new ConcurrentHashMap<ServerCnxn,ConnectionBean>();
public void onClose(ServerCnxn sc) {
ConnectionBean b=map.remove(sc);
if(b!=null){
ZooTrace.logTraceMessage(LOG, ZooTrace.JMX_TRACE_MASK,
"Un-registering a ConnectionBean: "+b);
MBeanRegistry.getInstance().unregister(b);
}