I'm not a fan adding these complicated `synchronised` code to accomplish the relatively straight-forward task of giving each connection a unique name. There are more simple ways to achieve this – you could generate a [UUID](http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html) for example. You could argue that this would be longer than the proposed integer approach (`CC99FA0B-9A09-4AD0-8081-3E0A12C5480C`) and make logs more difficult to read for a human. I think the simplification of the code is worth it though.