Fixing a bug in the way the JMX bean names are picked

The getter was missing a synchronized and it is using scala mutable map.