String uuid = UUIDGenerator.generate();
// JMX does not allow ':' in the ObjectName so replace these with underscore
uuid = uuid.replaceAll(":", "_");
uuid = uuid.replaceAll("-", "_");
applicationName += "_" + uuid;
jmxManager = new JmxManager("org.apache.uima");
clientSideJmxStats.setApplicationName(applicationName);
clientJmxObjectName = new ObjectName("org.apache.uima:name=" + applicationName);
jmxManager.registerMBean(clientSideJmxStats, clientJmxObjectName);
// these next lines were an experiment - not used https://issues.apache.org/jira/browse/UIMA-2249