final String jmxUrl0 = jmxUrl;
new Thread(new Runnable() {
public void run() {
try {
final IHeartbeatRepository repository = (IHeartbeatRepository) Class
.forName(heartbeatRepositoryClassName)
.getConstructor(String.class).newInstance(uid);
final IHeartbeat heartbeat = new Heartbeat(System
.currentTimeMillis(), uid, jmxUrl0);
while (true) {
repository.update(heartbeat);
Thread.sleep(IHeartbeat.INTERVAL);
}
} catch (InterruptedException exc) {
Thread.currentThread().interrupt();
return;